Skip to content

Commit

Permalink
Mergify and actions upgrades (#10260)
Browse files Browse the repository at this point in the history
* upgrade actions/upload-artifact to v4

* update Mergify queue strategies

Mergify is requiring that separate queues be used for different
merge strategies, staerting in mid-September with a brownout in
mid-August.

https://docs.mergify.com/configuration/file-format/#queue-rules

* update actions/download-artifact

This one wasn't throwing warnings, but has also been updated with
the same deprecation timeframe. It's also incompatible with
actions/upload-artifact@v4.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 75711fc)
  • Loading branch information
geekosaur committed Sep 13, 2024
1 parent 7b77a2d commit 467eef4
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 22 deletions.
31 changes: 19 additions & 12 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ pull_request_rules:
- actions:
queue:
name: default
# Merge into master with a merge commit
method: merge
# Update the pr branch with rebase, so the history is clean
update_method: rebase
name: Put pull requests in the rebase+merge queue
conditions:
- base=master
Expand All @@ -33,11 +29,7 @@ pull_request_rules:
# merge+squash strategy
- actions:
queue:
name: default
method: squash
# both update methods get absorbed by the squash, so we use the most
# reliable
update_method: merge
name: squash-merge
name: Put pull requests in the squash+merge queue
conditions:
- base=master
Expand All @@ -61,16 +53,24 @@ pull_request_rules:
queue:
name: default
# Merge with a merge commit
method: merge
# Update the pr branch with rebase, so the history is clean
update_method: rebase
name: Put backports in the rebase+merge queue
conditions:
- label=merge me
- base!=master
- body~=backport
- '#approved-reviews-by>=1'

# merge+squash strategy for backports: require 1 approver instead of 2
- actions:
queue:
name: squash-merge
name: Put backports in the squash+merge queue
conditions:
- label=squash+merge me
- base!=master
- body~=backport
- '#approved-reviews-by>=1'

# backports should be labeled as such
- actions:
label:
Expand All @@ -81,5 +81,12 @@ pull_request_rules:
- body~=automatic backport

queue_rules:
# Mergify now requires different queues for different strategies
- name: default
update_bot_account: Mikolaj
merge_method: merge
update_method: rebase
- name: squash-merge
update_bot_account: Mikolaj
merge_method: squash
update_method: merge
2 changes: 1 addition & 1 deletion .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
run: |
_build/bin/cabal --version
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cabal-${{ matrix.os }}-${{ matrix.ghc }}-bootstrapped
path: _build/artifacts/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/users-guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: |
make SPHINX_HTML_OUTDIR=html users-guide
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: users-guide-html
path: html/
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:
# - Make it available in the workflow to make easier testing it locally
- name: Upload cabal-install executable to workflow artifacts
if: matrix.ghc == env.GHC_FOR_RELEASE
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cabal-${{ runner.os }}-x86_64
path: ${{ env.CABAL_EXEC_TAR }}
Expand Down Expand Up @@ -337,7 +337,7 @@ jobs:
echo "CABAL_EXEC_TAR=$CABAL_EXEC_TAR" >> "$GITHUB_ENV"
- name: Upload cabal-install executable to workflow artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cabal-${{ runner.os }}-static-x86_64
path: ${{ env.CABAL_EXEC_TAR }}
Expand Down Expand Up @@ -374,7 +374,7 @@ jobs:
cabal-version: latest # default, we are not using it in this job

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

steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: cabal-Windows-x86_64

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: cabal-Linux-x86_64

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: cabal-Linux-static-x86_64

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: cabal-macOS-x86_64

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

0 comments on commit 467eef4

Please sign in to comment.