Skip to content

Commit 8e3390d

Browse files
committed
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. Closes: bootc-dev/infra#143 Assisted-by: OpenCode (Claude Sonnet 4.6)
1 parent 761eda6 commit 8e3390d

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ on:
44
branches: [main]
55
pull_request:
66
branches: [main]
7+
merge_group:
78
permissions:
89
contents: read
910

1011
# don't waste job slots on superseded code
1112
concurrency:
12-
group: ${{ github.workflow }}-${{ github.ref }}
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1314
cancel-in-progress: true
1415

1516
env:
@@ -42,3 +43,19 @@ jobs:
4243
run: rustup component add rustfmt clippy
4344
- name: just ci
4445
run: just ci
46+
47+
required-checks:
48+
if: always()
49+
needs: [semver-checks, build-test-lint]
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Check all jobs
53+
env:
54+
NEEDS: ${{ toJson(needs) }}
55+
run: |
56+
FAILED=$(echo "$NEEDS" | jq -r 'to_entries[] | select(.value.result | IN("success","skipped") | not) | .key')
57+
if [ -n "$FAILED" ]; then
58+
echo "The following jobs did not succeed: $FAILED"
59+
exit 1
60+
fi
61+
echo "All jobs succeeded or were skipped."

0 commit comments

Comments
 (0)