Skip to content

Commit

Permalink
workflow dependencies experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Bryce authored and SteveLasker committed Nov 14, 2024
1 parent 82c8a5e commit ac63fbb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 26 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
name: Build and test

on:
push:

workflow_call:
jobs:
build:
strategy:
Expand Down
34 changes: 12 additions & 22 deletions .github/workflows/merge-requires.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,19 @@
# appropriate to satisfy that check.
name: Merge Requires
on:
workflow_run:
workflows:
- Build and test
- Package and Publish
types:
- completed
push:

jobs:
ci:
secrets: inherit
uses: ./github/workflows/ci.yml
release:
secrets: inherit
uses: ./github/workflows/package.yml

merge-checks-ok:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: |
echo 'The merge check passed'
echo ${{ github.event.workflow_run.name }}
echo ${{ github.event.workflow_run.url }}
needs: [ci]

merge-checks-failed:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: |
echo 'The merge check failed'
echo ${{ github.event.workflow_run.name }}
echo ${{ github.event.workflow_run.url }}
exit 1
release-checks-ok:
if: ${{ github.event_name == 'release' }}
needs: [ci, release]
3 changes: 1 addition & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
name: Package and Publish

on:
pull_request:
release:
workflow_call:

jobs:
build:
Expand Down

0 comments on commit ac63fbb

Please sign in to comment.