You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Branch Guard
v1
Create following .github/workflows/branch-guard.yml
that will block PRs from merging when the latest Check Suite
starts failing and unblock once it's passing again:
on:
check_suite: # to update all PRs upon a Check Suite completion
type: ['completed']
pull_request: # to update newly open PRs
type: ['opened']
name: Branch Guard
jobs:
branch-guard:
name: Branch Guard
if: github.event.check_suite.head_branch == 'master' || github.event.pull_request.base.ref == 'master'
runs-on: ubuntu-latest
steps:
- uses: cirrus-actions/branch-guard@v1
with:
appsToCheck: Cirrus CI # or any other App name (can be a comma separated list of names)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}