From 39dddeb18e86603218b12e58ad6e5f33edfc62e1 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Thu, 15 Oct 2026 21:29:01 +0000 Subject: [PATCH] Add an 'All checks' aggregate job to CI GitHub only blocks a merge on status checks that branch protection names. This job needs every other job in the workflow and fails unless all of them succeeded, so branch protection can require just it. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ff4c16..9e92ee6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,3 +79,21 @@ jobs: run: >- /opt/puppetlabs/bolt/bin/bolt plan run puppetsync options='{"list_pipeline_stages": true}' + + # The one check for branch protection to require: GitHub only blocks a + # merge on checks listed by name, and this job fails unless every job it + # needs succeeded. Add any new job in this workflow to `needs:`. + all-checks: + name: 'All checks' + if: always() + needs: + - spec + - bolt + runs-on: ubuntu-latest + steps: + - name: 'Fail unless every needed job succeeded' + env: + NEEDS: ${{ toJSON(needs) }} + run: | + jq -r 'to_entries[] | "\(.key): \(.value.result)"' <<< "$NEEDS" + jq -e 'all(.[]; .result == "success")' <<< "$NEEDS" > /dev/null