Skip to content

Commit 86f7f2c

Browse files
authored
Merge pull request #10300 from haskell/mergify/bp/3.12/pr-10260
Mergify and actions upgrades (backport #10260)
2 parents 5501aa2 + c2e5c5c commit 86f7f2c

File tree

4 files changed

+29
-22
lines changed

4 files changed

+29
-22
lines changed

.github/mergify.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ pull_request_rules:
1919
- actions:
2020
queue:
2121
name: default
22-
# Merge into master with a merge commit
23-
method: merge
24-
# Update the pr branch with rebase, so the history is clean
25-
update_method: rebase
2622
name: Put pull requests in the rebase+merge queue
2723
conditions:
2824
- base=master
@@ -33,11 +29,7 @@ pull_request_rules:
3329
# merge+squash strategy
3430
- actions:
3531
queue:
36-
name: default
37-
method: squash
38-
# both update methods get absorbed by the squash, so we use the most
39-
# reliable
40-
update_method: merge
32+
name: squash-merge
4133
name: Put pull requests in the squash+merge queue
4234
conditions:
4335
- base=master
@@ -61,16 +53,24 @@ pull_request_rules:
6153
queue:
6254
name: default
6355
# Merge with a merge commit
64-
method: merge
65-
# Update the pr branch with rebase, so the history is clean
66-
update_method: rebase
6756
name: Put backports in the rebase+merge queue
6857
conditions:
6958
- label=merge me
7059
- base!=master
7160
- body~=backport
7261
- '#approved-reviews-by>=1'
7362

63+
# merge+squash strategy for backports: require 1 approver instead of 2
64+
- actions:
65+
queue:
66+
name: squash-merge
67+
name: Put backports in the squash+merge queue
68+
conditions:
69+
- label=squash+merge me
70+
- base!=master
71+
- body~=backport
72+
- '#approved-reviews-by>=1'
73+
7474
# backports should be labeled as such
7575
- actions:
7676
label:
@@ -81,5 +81,12 @@ pull_request_rules:
8181
- body~=automatic backport
8282

8383
queue_rules:
84+
# Mergify now requires different queues for different strategies
8485
- name: default
8586
update_bot_account: Mikolaj
87+
merge_method: merge
88+
update_method: rebase
89+
- name: squash-merge
90+
update_bot_account: Mikolaj
91+
merge_method: squash
92+
update_method: merge

.github/workflows/bootstrap.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
run: |
7070
_build/bin/cabal --version
7171
72-
- uses: actions/upload-artifact@v3
72+
- uses: actions/upload-artifact@v4
7373
with:
7474
name: cabal-${{ matrix.os }}-${{ matrix.ghc }}-bootstrapped
7575
path: _build/artifacts/*

.github/workflows/users-guide.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
run: |
7474
make SPHINX_HTML_OUTDIR=html users-guide
7575
76-
- uses: actions/upload-artifact@v3
76+
- uses: actions/upload-artifact@v4
7777
with:
7878
name: users-guide-html
7979
path: html/

.github/workflows/validate.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
# - Make it available in the workflow to make easier testing it locally
190190
- name: Upload cabal-install executable to workflow artifacts
191191
if: matrix.ghc == env.GHC_FOR_RELEASE
192-
uses: actions/upload-artifact@v3
192+
uses: actions/upload-artifact@v4
193193
with:
194194
name: cabal-${{ runner.os }}-x86_64
195195
path: ${{ env.CABAL_EXEC_TAR }}
@@ -337,7 +337,7 @@ jobs:
337337
echo "CABAL_EXEC_TAR=$CABAL_EXEC_TAR" >> "$GITHUB_ENV"
338338
339339
- name: Upload cabal-install executable to workflow artifacts
340-
uses: actions/upload-artifact@v3
340+
uses: actions/upload-artifact@v4
341341
with:
342342
name: cabal-${{ runner.os }}-static-x86_64
343343
path: ${{ env.CABAL_EXEC_TAR }}
@@ -374,7 +374,7 @@ jobs:
374374
cabal-version: latest # default, we are not using it in this job
375375

376376
- name: Download cabal executable from workflow artifacts
377-
uses: actions/download-artifact@v3
377+
uses: actions/download-artifact@v4
378378
with:
379379
name: cabal-${{ runner.os }}-x86_64
380380
path: cabal-head
@@ -399,19 +399,19 @@ jobs:
399399
needs: [validate, validate-old-ghcs, build-alpine, dogfooding]
400400

401401
steps:
402-
- uses: actions/download-artifact@v3
402+
- uses: actions/download-artifact@v4
403403
with:
404404
name: cabal-Windows-x86_64
405405

406-
- uses: actions/download-artifact@v3
406+
- uses: actions/download-artifact@v4
407407
with:
408408
name: cabal-Linux-x86_64
409409

410-
- uses: actions/download-artifact@v3
410+
- uses: actions/download-artifact@v4
411411
with:
412412
name: cabal-Linux-static-x86_64
413413

414-
- uses: actions/download-artifact@v3
414+
- uses: actions/download-artifact@v4
415415
with:
416416
name: cabal-macOS-x86_64
417417

@@ -429,7 +429,7 @@ jobs:
429429
cabal-head-macOS-x86_64.tar.gz
430430
431431
# We use this job as a summary of the workflow
432-
# It will fail if any of the previous jobs does it
432+
# It will fail if any of the previous jobs does
433433
# This way we can use it exclusively in branch protection rules
434434
# and abstract away the concrete jobs of the workflow, including their names
435435
validate-post-job:

0 commit comments

Comments
 (0)