diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cd.yaml similarity index 54% rename from .github/workflows/cicd.yaml rename to .github/workflows/cd.yaml index 594aad5..093e0fa 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cd.yaml @@ -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: @@ -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: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..b41f8ec --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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