From 675c90fd4754897abdac65daaa0a67062dedf34f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 12 Jun 2026 10:17:42 -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.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 84d5459..26d6753 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,7 @@ on: branches: [ main ] pull_request: branches: [ main ] + merge_group: env: CARGO_NET_RETRY: 10 @@ -16,6 +17,10 @@ env: RUSTUP_MAX_RETRIES: 10 RUST_BACKTRACE: short +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: semver-checks: name: Semver Checks @@ -61,3 +66,19 @@ jobs: fetch-depth: 20 - name: Test ostree-rs-ext run: ./ci/test-ostree-rs-ext.sh + + required-checks: + if: always() + needs: [semver-checks, build-test] + 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."