diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8bacbb3dbf..18552233dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,6 +4,7 @@ name: CI on: + merge_group: pull_request: branches: - "*" @@ -21,7 +22,7 @@ jobs: # Do not edit this file in .github/workflows build-windows-pr: # job-name skip-master skip-stable runs-on: windows-latest - if: ${{ github.event.pull_request }} # skip-master skip-stable + if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable env: RUSTFLAGS: -Ctarget-feature=+crt-static strategy: @@ -153,7 +154,7 @@ jobs: # Do not edit this file in .github/workflows build-windows-master: # job-name skip-pr skip-stable runs-on: windows-latest - if: ${{ (github.event_name == 'push' && github.ref_name == 'master') || github.event.schedule }} # skip-pr skip-stable + if: ${{ (github.event_name == 'push' && github.ref_name == 'master') || github.event_name == 'schedule' }} # skip-pr skip-stable env: RUSTFLAGS: -Ctarget-feature=+crt-static strategy: @@ -432,7 +433,7 @@ jobs: # Do not edit this file in .github/workflows build-linux-pr: # job-name skip-master skip-stable runs-on: ubuntu-latest - if: ${{ github.event.pull_request }} # skip-master skip-stable + if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable strategy: fail-fast: false matrix: @@ -576,7 +577,7 @@ jobs: # Do not edit this file in .github/workflows build-linux-master: # job-name skip-pr skip-stable runs-on: ubuntu-latest - if: ${{ (github.event_name == 'push' && github.ref_name == 'master') || github.event.schedule }} # skip-pr skip-stable + if: ${{ (github.event_name == 'push' && github.ref_name == 'master') || github.event_name == 'schedule' }} # skip-pr skip-stable strategy: fail-fast: false matrix: @@ -1142,7 +1143,7 @@ jobs: # templating and so on. build-all-features: # job-name runs-on: ubuntu-latest - if: ${{ github.event.pull_request }} + if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} strategy: fail-fast: false matrix: @@ -1181,7 +1182,7 @@ jobs: # stable is placed in the root of the gh-pages branch, while master is placed at /devel doc: # job-name runs-on: ubuntu-latest - if: ${{ github.event.pull_request }} + if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} steps: - uses: actions/checkout@v4 with: diff --git a/ci/actions-templates/all-features-template.yaml b/ci/actions-templates/all-features-template.yaml index 7e7bab0c21..3bfaa054f3 100644 --- a/ci/actions-templates/all-features-template.yaml +++ b/ci/actions-templates/all-features-template.yaml @@ -9,7 +9,7 @@ jobs: # skip-all # templating and so on. build-all-features: # job-name runs-on: ubuntu-latest - if: ${{ github.event.pull_request }} + if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} strategy: fail-fast: false matrix: diff --git a/ci/actions-templates/gen-workflows.sh b/ci/actions-templates/gen-workflows.sh index abe8d1d385..4b06f882c4 100755 --- a/ci/actions-templates/gen-workflows.sh +++ b/ci/actions-templates/gen-workflows.sh @@ -14,6 +14,7 @@ cat << EOF > "$OUTPATH" name: CI on: + merge_group: pull_request: branches: - "*" diff --git a/ci/actions-templates/linux-builds-template.yaml b/ci/actions-templates/linux-builds-template.yaml index 6c6e083f56..6e027e9e40 100644 --- a/ci/actions-templates/linux-builds-template.yaml +++ b/ci/actions-templates/linux-builds-template.yaml @@ -6,8 +6,8 @@ jobs: # skip-master skip-pr skip-stable build-linux-master: # job-name skip-pr skip-stable build-linux-stable: # job-name skip-master skip-pr runs-on: ubuntu-latest - if: ${{ github.event.pull_request }} # skip-master skip-stable - if: ${{ (github.event_name == 'push' && github.ref_name == 'master') || github.event.schedule }} # skip-pr skip-stable + if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable + if: ${{ (github.event_name == 'push' && github.ref_name == 'master') || github.event_name == 'schedule' }} # skip-pr skip-stable if: ${{ github.event_name == 'push' && github.ref_name == 'stable' }} # skip-pr skip-master strategy: fail-fast: false diff --git a/ci/actions-templates/test-docs-template.yaml b/ci/actions-templates/test-docs-template.yaml index c17cd52193..ca5a899323 100644 --- a/ci/actions-templates/test-docs-template.yaml +++ b/ci/actions-templates/test-docs-template.yaml @@ -7,7 +7,7 @@ jobs: # skip-all # stable is placed in the root of the gh-pages branch, while master is placed at /devel doc: # job-name runs-on: ubuntu-latest - if: ${{ github.event.pull_request }} + if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} steps: - uses: actions/checkout@v4 with: diff --git a/ci/actions-templates/windows-builds-template.yaml b/ci/actions-templates/windows-builds-template.yaml index 816d2886c1..fa693dcc5e 100644 --- a/ci/actions-templates/windows-builds-template.yaml +++ b/ci/actions-templates/windows-builds-template.yaml @@ -6,8 +6,8 @@ jobs: # skip-master skip-pr skip-stable build-windows-master: # job-name skip-pr skip-stable build-windows-stable: # job-name skip-master skip-pr runs-on: windows-latest - if: ${{ github.event.pull_request }} # skip-master skip-stable - if: ${{ (github.event_name == 'push' && github.ref_name == 'master') || github.event.schedule }} # skip-pr skip-stable + if: ${{ contains('["pull_request", "merge_group"]', github.event_name) }} # skip-master skip-stable + if: ${{ (github.event_name == 'push' && github.ref_name == 'master') || github.event_name == 'schedule' }} # skip-pr skip-stable if: ${{ github.event_name == 'push' && github.ref_name == 'stable' }} # skip-pr skip-master env: RUSTFLAGS: -Ctarget-feature=+crt-static