From c2e5c5c33d218df6f9edf4c43fc78d53c31e3eaa Mon Sep 17 00:00:00 2001 From: brandon s allbery kf8nh Date: Mon, 19 Aug 2024 13:26:55 -0400 Subject: [PATCH] Mergify and actions upgrades (#10260) * 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 75711fca5526e950c462b1f56247087ffb379fad) --- .github/mergify.yml | 31 +++++++++++++++++++------------ .github/workflows/bootstrap.yml | 2 +- .github/workflows/users-guide.yml | 2 +- .github/workflows/validate.yml | 16 ++++++++-------- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index b0dbe1033b8..a7bc364c473 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -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 @@ -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 @@ -61,9 +53,6 @@ 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 @@ -71,6 +60,17 @@ pull_request_rules: - 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: @@ -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 diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index ecfb015c699..e74d355360f 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -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/* diff --git a/.github/workflows/users-guide.yml b/.github/workflows/users-guide.yml index 8442b39c2f4..64969e427c4 100644 --- a/.github/workflows/users-guide.yml +++ b/.github/workflows/users-guide.yml @@ -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/ diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 8714ba757eb..25a734a47aa 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -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 }} @@ -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 }} @@ -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 @@ -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 @@ -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: