Skip to content

Merge Requires

Merge Requires #10

# This workflow configures the repository specific choices of which CI builds
# must pass in order for a build to merge. This allows a sinlge global teraform
# configured rule to require a "well known" check in each repository. Whilst
# granting repository stakeholders the ability configure what workflows are
# appropriate to satisfy that check.
name: Merge Requires
on:
workflow_run:
workflows:
- Build and test
- Package and Publish
types:
- completed
jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- run: echo 'The repository configured checks have all passed'
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: |
echo 'One or more configured repository checks failed'
exit 1