Skip to content

Commit d514d53

Browse files
committed
Introduce a centralized GHA check/gate job
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
1 parent 527d612 commit d514d53

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/core.yml

+15
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,18 @@ jobs:
4545
commit: true
4646
url: ${{ secrets.SLACK_BUILD_WEBHOOK }}
4747
token: ${{ secrets.SLACK_GITHUB_TOKEN }}
48+
49+
# https://github.com/marketplace/actions/alls-green#why
50+
check: # This job does nothing and is only used for the branch protection
51+
if: always()
52+
53+
needs:
54+
- build
55+
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
- name: Decide whether the needed jobs succeeded or failed
60+
uses: re-actors/alls-green@release/v1
61+
with:
62+
jobs: ${{ toJSON(needs) }}

0 commit comments

Comments
 (0)