eBPF-based security platform
ci: Get ready to enable merge queue
Michi Mutsuzaki6514073a6b62
diff --git a/.github/scripts/ci-commit-range.sh b/.github/scripts/ci-commit-range.shindex 690d9b4d..557f0c70 100755--- a/.github/scripts/ci-commit-range.sh+++ b/.github/scripts/ci-commit-range.sh@@ -3,16 +3,16 @@# Copyright (c) 2026 Authors of shirudo## .github/scripts/ci-commit-range.sh -- run a checker over the commits a-# GitHub event covers: every commit a pull request adds, or a push brings-# to the branch. A push whose previous tip is unknown, after a force push,-# is checked at the pushed tip alone.+# GitHub event covers: every commit a pull request or merge group adds, or+# a push brings to the branch. A push whose previous tip is unknown, after+# a force push, is checked at the pushed tip alone.## .github/scripts/ci-commit-range.sh <command> [<argument>...]## The command runs with the rev-list arguments for the range appended,# the form check-dco.sh and check-style.sh take. The event comes from the# environment the workflow sets: EVENT_NAME, and BASE_SHA and HEAD_SHA for-# a pull request, BEFORE_SHA and SHA for a push.+# a pull request or merge group, BEFORE_SHA and SHA for a push.set -eu@@ -21,7 +21,8 @@ set -euexit 2}-if [ "${EVENT_NAME:-}" = pull_request ]; then+if [ "${EVENT_NAME:-}" = pull_request ] ||+ [ "${EVENT_NAME:-}" = merge_group ]; thenset -- "$@" "${BASE_SHA:?}..${HEAD_SHA:?}"elif git cat-file -e "${BEFORE_SHA:-}^{commit}" 2>/dev/null; thenset -- "$@" "$BEFORE_SHA..${SHA:?}"diff --git a/.github/workflows/build-commits.yml b/.github/workflows/build-commits.ymlindex 6a386049..4142ba4c 100644--- a/.github/workflows/build-commits.yml+++ b/.github/workflows/build-commits.yml@@ -5,6 +5,8 @@ on:branches:- mainpull_request:+ merge_group:+ types: [checks_requested]permissions:contents: read@@ -52,4 +54,4 @@ jobs:.github/scripts/vm-toolchain.sh. build/vm-toolchain.envGITHUB_ACTIONS=true .github/scripts/build-commits.sh \- ${{ github.event_name == 'pull_request' && format('{0}..{1}', github.event.pull_request.base.sha, github.event.pull_request.head.sha) || format('{0}..{1}', github.event.before, github.sha) }}+ ${{ (github.event.pull_request.base.sha || github.event.merge_group.base_sha) && format('{0}..{1}', github.event.pull_request.base.sha || github.event.merge_group.base_sha, github.event.pull_request.head.sha || github.event.merge_group.head_sha) || format('{0}..{1}', github.event.before, github.sha) }}diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 2feec04e..829c485f 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -5,6 +5,8 @@ on:branches:- mainpull_request:+ merge_group:+ types: [checks_requested]permissions:contents: readdiff --git a/.github/workflows/dco.yml b/.github/workflows/dco.ymlindex 65ae3f12..f5903724 100644--- a/.github/workflows/dco.yml+++ b/.github/workflows/dco.yml@@ -5,6 +5,8 @@ on:branches:- mainpull_request:+ merge_group:+ types: [checks_requested]permissions:contents: read@@ -35,8 +37,8 @@ jobs:- name: Check the sign-off of every commitenv:EVENT_NAME: ${{ github.event_name }}- BASE_SHA: ${{ github.event.pull_request.base.sha }}- HEAD_SHA: ${{ github.event.pull_request.head.sha }}+ BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}+ HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }}BEFORE_SHA: ${{ github.event.before }}SHA: ${{ github.sha }}run: .github/scripts/ci-commit-range.sh .github/scripts/check-dco.shdiff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlindex 7ba8a123..d877eb4e 100644--- a/.github/workflows/docs.yml+++ b/.github/workflows/docs.yml@@ -7,6 +7,8 @@ on:tags:- '*'pull_request:+ merge_group:+ types: [checks_requested]workflow_dispatch:permissions:diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.ymlindex a211fb60..b6b6135d 100644--- a/.github/workflows/lint.yml+++ b/.github/workflows/lint.yml@@ -5,6 +5,8 @@ on:branches:- mainpull_request:+ merge_group:+ types: [checks_requested]permissions:contents: read@@ -115,8 +117,8 @@ jobs:- name: Run checkpatch over every commitenv:EVENT_NAME: ${{ github.event_name }}- BASE_SHA: ${{ github.event.pull_request.base.sha }}- HEAD_SHA: ${{ github.event.pull_request.head.sha }}+ BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}+ HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }}BEFORE_SHA: ${{ github.event.before }}SHA: ${{ github.sha }}run: .github/scripts/ci-commit-range.sh .github/scripts/check-style.shdiff --git a/.github/workflows/packages.yml b/.github/workflows/packages.ymlindex 0e4c83d1..078b0d12 100644--- a/.github/workflows/packages.yml+++ b/.github/workflows/packages.yml@@ -8,6 +8,8 @@ on:- '*'- '!test-kernel-*'pull_request:+ merge_group:+ types: [checks_requested]workflow_dispatch:inputs:additional_config_cert:@@ -325,7 +327,7 @@ jobs:if-no-files-found: errorkernel-obs-preview:- if: github.event_name == 'pull_request'+ if: github.event_name == 'pull_request' || github.event_name == 'merge_group'needs: [deb, rpm-target]runs-on: ubuntu-latesttimeout-minutes: 30@@ -339,8 +341,8 @@ jobs:uses: ./.github/actions/kernel-obswith:mode: preview- version: 0.1.${{ github.run_number }}-pr.${{ github.event.pull_request.number }}- artifact-name: kernel-obs-preview-pr-${{ github.event.pull_request.number }}+ version: 0.1.${{ github.run_number }}-${{ github.event_name == 'pull_request' && format('pr.{0}', github.event.pull_request.number) || 'merge-group' }}+ artifact-name: ${{ github.event_name == 'pull_request' && format('kernel-obs-preview-pr-{0}', github.event.pull_request.number) || format('kernel-obs-preview-merge-group-{0}', github.event.merge_group.head_sha) }}kernel-obs-publish:if: github.event_name == 'push' && github.ref == 'refs/heads/main'diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 5e383ec3..3a1b1950 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -5,6 +5,8 @@ on:branches:- mainpull_request:+ merge_group:+ types: [checks_requested]workflow_dispatch:inputs:kernel_run_id:@@ -41,7 +43,7 @@ jobs:- name: Check whether the kernel inputs changedid: selectenv:- BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}+ BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || github.event.before }}KERNEL_RUN_ID: ${{ inputs.kernel_run_id }}run: sh .github/scripts/select-test-kernel.sh