Skip to content

Commit

Permalink
Merge pull request #10300 from haskell/mergify/bp/3.12/pr-10260
Browse files Browse the repository at this point in the history
Mergify and actions upgrades (backport #10260)
  • Loading branch information
mergify[bot] authored Sep 13, 2024
2 parents 5501aa2 + c2e5c5c commit 86f7f2c
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 86f7f2c

Please sign in to comment.