Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: migrate from codefresh to github actions #33

Merged
merged 3 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Nightly Build

on:
workflow_dispatch:
schedule:
- cron: '0 10 * * *' # Run every day at 10AM UTC

jobs:
call-nightly-workflow:
uses: lacework/oss-actions/.github/workflows/tf-nightly.yml@main
secrets: inherit
8 changes: 8 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Prepare Release

on: workflow_dispatch

jobs:
call-nightly-workflow:
uses: lacework/oss-actions/.github/workflows/tf-prepare-release.yml@main
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- 'v*'

jobs:
call-nightly-workflow:
uses: lacework/oss-actions/.github/workflows/tf-release.yml@main
secrets: inherit
29 changes: 29 additions & 0 deletions .github/workflows/test-compat-pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test Compatibility On Comment

on:
workflow_dispatch:
issue_comment:
types: [created, edited]

jobs:
check-commenting-user:
runs-on: ubuntu-latest
if: ${{ contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, 'make it so') }}
steps:
- uses: actions/github-script@v7
with:
script: |
const creator = context.payload.sender.login
const result = await github.rest.teams.getMembershipForUserInOrg({
org: context.repo.owner,
team_slug: 'growth-team',
username: creator
})
if (result.state != "active" ) {
core.setFailed('Commenter is not a member of the growth team.')
}

call-test-compat:
needs: check-commenting-user
uses: lacework/oss-actions/.github/workflows/tf-test-compatibility.yml@main
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/test-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Test Compatibility

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
call-test-compat:
uses: lacework/oss-actions/.github/workflows/tf-test-compatibility.yml@main
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/verify-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Verify Release

on:
workflow_dispatch:
push:
branches:
- release

jobs:
call-nightly-workflow:
uses: lacework/oss-actions/.github/workflows/tf-verify.yml@main
secrets: inherit
2 changes: 1 addition & 1 deletion .terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
formatter: "markdown"
version: "0.16.0"
version: ">=0.16.0"
output:
file: README.md
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ artifactregistry.googleapis.com
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.14 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.4.0, < 5.0.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.4.0 |
| <a name="requirement_lacework"></a> [lacework](#requirement\_lacework) | ~> 1.18 |
| <a name="requirement_time"></a> [time](#requirement\_time) | ~> 0.6 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | >= 4.4.0, < 5.0.0 |
| <a name="provider_google"></a> [google](#provider\_google) | >= 4.4.0 |
| <a name="provider_lacework"></a> [lacework](#provider\_lacework) | ~> 1.18 |
| <a name="provider_random"></a> [random](#provider\_random) | n/a |
| <a name="provider_time"></a> [time](#provider\_time) | ~> 0.6 |
Expand All @@ -54,7 +54,7 @@ artifactregistry.googleapis.com

| Name | Source | Version |
|------|--------|---------|
| <a name="module_lacework_gar_svc_account"></a> [lacework\_gar\_svc\_account](#module\_lacework\_gar\_svc\_account) | lacework/service-account/gcp | ~> 1.0 |
| <a name="module_lacework_gar_svc_account"></a> [lacework\_gar\_svc\_account](#module\_lacework\_gar\_svc\_account) | lacework/service-account/gcp | ~> 2.0 |

## Resources

Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ data "google_project" "selected" {

module "lacework_gar_svc_account" {
source = "lacework/service-account/gcp"
version = "~> 1.0"
version = "~> 2.0"
create = var.use_existing_service_account ? false : true
service_account_name = local.service_account_name
project_id = local.project_id
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_version = ">= 0.14"

required_providers {
google = ">= 4.4.0, < 5.0.0"
google = ">= 4.4.0"
time = "~> 0.6"
lacework = {
source = "lacework/lacework"
Expand Down
Loading