Skip to content

Commit

Permalink
Introduce a centralized GHA check/gate job
Browse files Browse the repository at this point in the history
This patch is intended to lower the maintenance burden of having to
manually go through each matrix subjob name in the branch protection
repository settings. It allows to only include the check job in the
branch protection and it will robustly determine if the dependencies
have succeeded or not.

It is currently mostly surves the Python ecosystem in projects like
aiohttp, cryptography, open edX, pip etc. But I've also seen other
communities picking it up lately, like the AWS Rust SDK and even the
engine powering https://dev.to, to my surprise. Strictly speaking, it
is agnostic.

Ref: https://github.com/marketplace/actions/alls-green#why
  • Loading branch information
webknjaz committed Nov 30, 2022
1 parent 527d612 commit d514d53
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,18 @@ jobs:
commit: true
url: ${{ secrets.SLACK_BUILD_WEBHOOK }}
token: ${{ secrets.SLACK_GITHUB_TOKEN }}

# https://github.com/marketplace/actions/alls-green#why
check: # This job does nothing and is only used for the branch protection
if: always()

needs:
- build

runs-on: ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

0 comments on commit d514d53

Please sign in to comment.