From 6f0f83aa524420bf831e86226c4d998bec9de5d7 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 12 Jun 2026 10:17:57 -0400 Subject: [PATCH] ci: Enable merge queue support Add the merge_group event trigger so CI runs when a pull request enters the GitHub merge queue. Also add a required-checks sentinel job that gates on all other jobs, which is the single check name to configure in the repository branch protection settings. xref: https://github.com/bootc-dev/infra/issues/143 Assisted-by: OpenCode (Claude Sonnet 4.6) Signed-off-by: Colin Walters --- .github/workflows/ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8e7bec..0069724 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,12 +4,13 @@ on: branches: [main] pull_request: branches: [main] + merge_group: permissions: contents: read # don't waste job slots on superseded code concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true env: @@ -42,3 +43,19 @@ jobs: run: rustup component add rustfmt clippy - name: just ci run: just ci + + required-checks: + if: always() + needs: [semver-checks, build-test-lint] + runs-on: ubuntu-latest + steps: + - name: Check all jobs + env: + NEEDS: ${{ toJson(needs) }} + run: | + FAILED=$(echo "$NEEDS" | jq -r 'to_entries[] | select(.value.result | IN("success","skipped") | not) | .key') + if [ -n "$FAILED" ]; then + echo "The following jobs did not succeed: $FAILED" + exit 1 + fi + echo "All jobs succeeded or were skipped."