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: Split cicd workflow into ci and cd #9

Merged
merged 1 commit into from
Sep 6, 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
14 changes: 3 additions & 11 deletions .github/workflows/cicd.yaml → .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
name: ci/cd
name: cd

on:
push:
branches: [ master ]
pull_request:

jobs:
# CI is run on pull requests and pushes to master (i.e merging PRs)
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./bin/make ci
uses: ./.github/workflows/ci.yaml

# Release is run only on pushes to master (i.e. merging PRs)
release:
runs-on: ubuntu-latest
needs: [ ci ]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -26,11 +19,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./bin/make release

# Send failure notification to slack if push to master job fails
howl-on-fail:
runs-on: ubuntu-latest
needs: [ ci, release ]
if: failure() && github.event_name == 'push'
if: failure()
steps:
- uses: foxygoat/howl@v1
env:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: ci

on:
pull_request:
workflow_call:

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./bin/make ci