diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22d3339..e3639a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,3 +61,26 @@ jobs: - name: Lint the workflows run: actionlint + + ci-ok: + name: ci-ok + # The one check the ruleset requires. always(), so a failed job fails this one instead of skipping it. + if: ${{ always() && !github.event.pull_request.draft }} + needs: [test, actionlint] + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - name: Every job passed + env: + NEEDS: ${{ toJSON(needs) }} + run: | + set -euo pipefail + python3 - <<'PY' + import json, os, sys + needs = json.loads(os.environ["NEEDS"]) + for name, n in needs.items(): + print(name + ": " + n["result"]) + bad = [k for k, n in needs.items() if n["result"] not in ("success", "skipped")] + if bad: + sys.exit("failed: " + ", ".join(bad)) + PY