Skip to content

Commit

Permalink
ci: migrate from codefresh to github actions (#95)
Browse files Browse the repository at this point in the history
* ci: migrate from codefresh to github actions

Signed-off-by: Timothy MacDonald <tim.macdonald@lacework.net>

* ci: update job name in test compat workflow

Signed-off-by: Timothy MacDonald <tim.macdonald@lacework.net>

* ci: temp switch to testing branch of oss-actions

Signed-off-by: Timothy MacDonald <tim.macdonald@lacework.net>

* ci: switch back to main branch of oss-actions

Signed-off-by: Timothy MacDonald <tim.macdonald@lacework.net>

---------

Signed-off-by: Timothy MacDonald <tim.macdonald@lacework.net>
  • Loading branch information
tmac1973 authored Apr 4, 2024
1 parent d218217 commit ba9707a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Nightly Build

on: workflow_dispatch

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

jobs:
call-nightly-workflow:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Release

on: workflow_dispatch

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

jobs:
call-nightly-workflow:
uses: lacework/oss-actions/.github/workflows/tf-release.yml@main
Expand Down
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
11 changes: 8 additions & 3 deletions .github/workflows/test-compatibility.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Test Compatibility

on: workflow_dispatch

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

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

on: workflow_dispatch
on:
workflow_dispatch:
push:
branches:
- release

jobs:
call-nightly-workflow:
Expand Down

0 comments on commit ba9707a

Please sign in to comment.