From 856edbca292382740b86fc497e79fceb473add75 Mon Sep 17 00:00:00 2001 From: "Worker Pants (Pantsbuild GitHub Automation Bot)" <133242086+WorkerPants@users.noreply.github.com> Date: Thu, 25 Jul 2024 01:25:04 -0400 Subject: [PATCH] Bump workflow actions for node20 (Cherry-pick of #21133) (#21198) We started to run into issues with node16 no longer being functional on the runner, with symptoms like https://github.com/actions/checkout/issues/1809 Co-authored-by: Andreas Stenius --- .github/workflows/audit.yaml | 2 +- .github/workflows/cache_comparison.yaml | 4 +- .github/workflows/public_repos.yaml | 88 +++---- .github/workflows/release.yaml | 38 +-- .github/workflows/test.yaml | 228 ++++++++++-------- .../generate_github_workflows.py | 54 +++-- 6 files changed, 228 insertions(+), 186 deletions(-) diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index 41d7d01e692..9196ec14c7b 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Cargo audit (for security vulnerabilities) diff --git a/.github/workflows/cache_comparison.yaml b/.github/workflows/cache_comparison.yaml index b50ed1eaee0..c99bb47cf71 100644 --- a/.github/workflows/cache_comparison.yaml +++ b/.github/workflows/cache_comparison.yaml @@ -8,11 +8,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons diff --git a/.github/workflows/public_repos.yaml b/.github/workflows/public_repos.yaml index 904046869e6..23b40f34532 100644 --- a/.github/workflows/public_repos.yaml +++ b/.github/workflows/public_repos.yaml @@ -13,12 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: AlexTereshenkov/cheeseshop-query - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Pants on @@ -98,12 +98,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: Ars-Linguistica/mlconjug3 - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Pants on @@ -150,12 +150,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: OpenSaMD/OpenSaMD - name: Set up Python 3.9.15 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9.15 - name: Pants on @@ -235,13 +235,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: StackStorm/st2 submodules: recursive - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.8' - name: Pants on @@ -333,12 +333,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: fucina/treb - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Pants on @@ -405,12 +405,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: ghandic/jsf - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Pants on @@ -467,12 +467,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: komprenilo/liga - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Pants on @@ -519,12 +519,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: lablup/backend.ai - name: Set up Python 3.11.4 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.11.4 - name: Pants on @@ -609,12 +609,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: mitodl/ol-django - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Pants on @@ -663,12 +663,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: mitodl/ol-infrastructure - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Pants on @@ -715,12 +715,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: naccdata/flywheel-gear-extensions - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Pants on @@ -778,16 +778,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: pantsbuild/example-adhoc - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Set up Node 20 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '20' - name: Pants on @@ -844,12 +844,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: pantsbuild/example-codegen - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - if: runner.os == 'Linux' @@ -941,12 +941,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: pantsbuild/example-django - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Pants on @@ -1027,12 +1027,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: pantsbuild/example-docker - name: Set up Python 3.8 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.8' - name: Pants on @@ -1112,16 +1112,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: pantsbuild/example-golang - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - name: Pants on @@ -1201,12 +1201,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: pantsbuild/example-jvm - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Pants on @@ -1286,12 +1286,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: pantsbuild/example-kotlin - name: Set up Python 3.10 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' - name: Pants on @@ -1371,12 +1371,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: pantsbuild/example-python - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Pants on @@ -1456,12 +1456,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: pantsbuild/example-visibility - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Pants on @@ -1531,12 +1531,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 repository: pantsbuild/scie-pants - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Pants on diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 09b9fd5ddc2..a192c59832a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: - ARM64 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 ref: ${{ needs.release_info.outputs.build-ref }} @@ -57,9 +57,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-wheels-and-pex-Linux-ARM64 + overwrite: 'true' path: .pants.d/workdir/*.log - if: needs.release_info.outputs.is-release == 'true' name: Upload Wheel and Pex @@ -93,7 +94,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 ref: ${{ needs.release_info.outputs.build-ref }} @@ -120,7 +121,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 23.x - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - env: @@ -134,9 +135,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-wheels-and-pex-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log - if: needs.release_info.outputs.is-release == 'true' name: Upload Wheel and Pex @@ -176,7 +178,7 @@ jobs: - macOS-10.15-X64 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 ref: ${{ needs.release_info.outputs.build-ref }} @@ -188,7 +190,7 @@ jobs: - name: Set rustup profile run: rustup set profile default - name: Cache Rust toolchain - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: macOS10-15-x86_64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain') }}-v2 @@ -211,7 +213,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 23.x - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - env: @@ -225,9 +227,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-wheels-and-pex-macOS10-15-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log - if: needs.release_info.outputs.is-release == 'true' name: Upload Wheel and Pex @@ -260,7 +263,7 @@ jobs: - macOS-11-ARM64 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 ref: ${{ needs.release_info.outputs.build-ref }} @@ -272,7 +275,7 @@ jobs: - name: Set rustup profile run: rustup set profile default - name: Cache Rust toolchain - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: macOS11-ARM64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain') }}-v2 @@ -295,7 +298,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 23.x - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - env: @@ -309,9 +312,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-wheels-and-pex-macOS11-ARM64 + overwrite: 'true' path: .pants.d/workdir/*.log - if: needs.release_info.outputs.is-release == 'true' name: Upload Wheel and Pex @@ -345,13 +349,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Pants at Release Tag - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: '0' fetch-tags: true ref: ${{ needs.release_info.outputs.build-ref }} - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons @@ -364,7 +368,7 @@ jobs: - name: Set rustup profile run: rustup set profile default - name: Cache Rust toolchain - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: Linux-x86_64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain') }}-v2 path: '~/.rustup/toolchains/1.78.0-* @@ -385,7 +389,7 @@ jobs: run: echo "hash=$(./build-support/bin/rust/print_engine_hash.sh)" >> $GITHUB_OUTPUT shell: bash - name: Cache native engine - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: Linux-x86_64-engine-${{ steps.get-engine-hash.outputs.hash }}-v1 path: 'src/python/pants/bin/native_client diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1adf13911d4..6af038022c3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,7 +24,7 @@ jobs: - ARM64 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Install Protoc @@ -35,7 +35,7 @@ jobs: - name: Set rustup profile run: rustup set profile default - name: Cache Rust toolchain - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: Linux-ARM64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain') }}-v2 path: '~/.rustup/toolchains/1.78.0-* @@ -56,7 +56,7 @@ jobs: run: echo "hash=$(./build-support/bin/rust/print_engine_hash.sh)" >> $GITHUB_OUTPUT shell: bash - name: Cache native engine - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: Linux-ARM64-engine-${{ steps.get-engine-hash.outputs.hash }}-v1 path: 'src/python/pants/bin/native_client @@ -81,12 +81,13 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-bootstrap-Linux-ARM64 + overwrite: 'true' path: .pants.d/workdir/*.log - name: Upload native binaries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-ARM64 path: 'src/python/pants/bin/native_client @@ -112,11 +113,11 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Install Protoc @@ -127,7 +128,7 @@ jobs: - name: Set rustup profile run: rustup set profile default - name: Cache Rust toolchain - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: Linux-x86_64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain') }}-v2 path: '~/.rustup/toolchains/1.78.0-* @@ -148,7 +149,7 @@ jobs: run: echo "hash=$(./build-support/bin/rust/print_engine_hash.sh)" >> $GITHUB_OUTPUT shell: bash - name: Cache native engine - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: Linux-x86_64-engine-${{ steps.get-engine-hash.outputs.hash }}-v1 path: 'src/python/pants/bin/native_client @@ -173,12 +174,13 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-bootstrap-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log - name: Upload native binaries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: 'src/python/pants/bin/native_client @@ -214,11 +216,11 @@ jobs: - macos-12 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Install Protoc @@ -229,7 +231,7 @@ jobs: - name: Set rustup profile run: rustup set profile default - name: Cache Rust toolchain - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: macOS12-x86_64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain') }}-v2 path: '~/.rustup/toolchains/1.78.0-* @@ -250,7 +252,7 @@ jobs: run: echo "hash=$(./build-support/bin/rust/print_engine_hash.sh)" >> $GITHUB_OUTPUT shell: bash - name: Cache native engine - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: macOS12-x86_64-engine-${{ steps.get-engine-hash.outputs.hash }}-v1 path: 'src/python/pants/bin/native_client @@ -275,12 +277,13 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-bootstrap-macOS12-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log - name: Upload native binaries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.macOS12-x86_64 path: 'src/python/pants/bin/native_client @@ -312,7 +315,7 @@ jobs: - ARM64 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Configure Git @@ -347,9 +350,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-wheels-and-pex-Linux-ARM64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 build_wheels_linux_x86_64: @@ -368,7 +372,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Configure Git @@ -393,7 +397,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 23.x - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - env: @@ -407,9 +411,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-wheels-and-pex-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 build_wheels_macos10_15_x86_64: @@ -427,7 +432,7 @@ jobs: - macOS-10.15-X64 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Install Protoc @@ -438,7 +443,7 @@ jobs: - name: Set rustup profile run: rustup set profile default - name: Cache Rust toolchain - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: macOS10-15-x86_64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain') }}-v2 path: '~/.rustup/toolchains/1.78.0-* @@ -460,7 +465,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 23.x - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - env: @@ -474,9 +479,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-wheels-and-pex-macOS10-15-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 build_wheels_macos11_arm64: @@ -494,7 +500,7 @@ jobs: - macOS-11-ARM64 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Install Protoc @@ -505,7 +511,7 @@ jobs: - name: Set rustup profile run: rustup set profile default - name: Cache Rust toolchain - uses: actions/cache@v3 + uses: actions/cache@v4 with: key: macOS11-ARM64-rustup-${{ hashFiles('src/rust/engine/rust-toolchain') }}-v2 path: '~/.rustup/toolchains/1.78.0-* @@ -527,7 +533,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 23.x - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - env: @@ -541,9 +547,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-wheels-and-pex-macOS11-ARM64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 check_labels: @@ -598,7 +605,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - id: classify @@ -620,7 +627,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -642,11 +649,11 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -659,9 +666,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-lint-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 30 merge_ok: @@ -725,16 +733,16 @@ jobs: - ARM64 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-ARM64 path: src/python/pants @@ -760,9 +768,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-Linux-ARM64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_linux_x86_64_0: @@ -777,7 +786,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -799,12 +808,12 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - if: runner.os == 'Linux' @@ -819,13 +828,13 @@ jobs: ' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -851,9 +860,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-0_10-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_linux_x86_64_1: @@ -868,7 +878,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -890,12 +900,12 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - if: runner.os == 'Linux' @@ -910,13 +920,13 @@ jobs: ' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -942,9 +952,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-1_10-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_linux_x86_64_2: @@ -959,7 +970,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -981,12 +992,12 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - if: runner.os == 'Linux' @@ -1001,13 +1012,13 @@ jobs: ' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -1033,9 +1044,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-2_10-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_linux_x86_64_3: @@ -1050,7 +1062,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1072,12 +1084,12 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - if: runner.os == 'Linux' @@ -1092,13 +1104,13 @@ jobs: ' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -1124,9 +1136,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-3_10-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_linux_x86_64_4: @@ -1141,7 +1154,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1163,12 +1176,12 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - if: runner.os == 'Linux' @@ -1183,13 +1196,13 @@ jobs: ' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -1215,9 +1228,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-4_10-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_linux_x86_64_5: @@ -1232,7 +1246,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1254,12 +1268,12 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - if: runner.os == 'Linux' @@ -1274,13 +1288,13 @@ jobs: ' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -1306,9 +1320,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-5_10-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_linux_x86_64_6: @@ -1323,7 +1338,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1345,12 +1360,12 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - if: runner.os == 'Linux' @@ -1365,13 +1380,13 @@ jobs: ' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -1397,9 +1412,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-6_10-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_linux_x86_64_7: @@ -1414,7 +1430,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1436,12 +1452,12 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - if: runner.os == 'Linux' @@ -1456,13 +1472,13 @@ jobs: ' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -1488,9 +1504,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-7_10-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_linux_x86_64_8: @@ -1505,7 +1522,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1527,12 +1544,12 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - if: runner.os == 'Linux' @@ -1547,13 +1564,13 @@ jobs: ' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -1579,9 +1596,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-8_10-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_linux_x86_64_9: @@ -1596,7 +1614,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1618,12 +1636,12 @@ jobs: \ \"PANTS_REMOTE_CACHE_READ=true\" >> \"$GITHUB_ENV\"\necho \"PANTS_REMOTE_CACHE_WRITE=${CACHE_WRITE}\" >> \"$GITHUB_ENV\"\ \n" - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.19.5 - if: runner.os == 'Linux' @@ -1638,13 +1656,13 @@ jobs: ' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.Linux-x86_64 path: src/python/pants @@ -1670,9 +1688,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-9_10-Linux-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 test_python_macos12_x86_64: @@ -1687,22 +1706,22 @@ jobs: - macos-12 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - name: Install AdoptJDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: adopt java-version: '11' - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Expose Pythons uses: pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe - name: Download native binaries - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: native_binaries.${{ matrix.python-version }}.macOS12-x86_64 path: src/python/pants @@ -1728,9 +1747,10 @@ jobs: - continue-on-error: true if: always() name: Upload pants.log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: logs-python-test-macOS12-x86_64 + overwrite: 'true' path: .pants.d/workdir/*.log timeout-minutes: 90 name: Pull Request CI diff --git a/src/python/pants_release/generate_github_workflows.py b/src/python/pants_release/generate_github_workflows.py index 587cf91fdaf..b804c9828da 100644 --- a/src/python/pants_release/generate_github_workflows.py +++ b/src/python/pants_release/generate_github_workflows.py @@ -19,6 +19,23 @@ from pants.util.strutil import softwrap +ACTION = { + "action-send-mail": "dawidd6/action-send-mail@v3.8.0", + "cache": "actions/cache@v4", + "checkout": "actions/checkout@v4", + "download-artifact": "actions/download-artifact@v4", + "expose-pythons": "pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe", + "github-action-required-labels": "mheap/github-action-required-labels@v4.0.0", + "rust-cache": "benjyw/rust-cache@461b9f8eee66b575bce78977bf649b8b7a8d53f1", + "setup-go": "actions/setup-go@v5", + "setup-java": "actions/setup-java@v4", + "setup-node": "actions/setup-node@v4", + "setup-protoc": "arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9", + "setup-python": "actions/setup-python@v5", + "slack-github-action": "slackapi/slack-github-action@v1.24.0", + "upload-artifact": "actions/upload-artifact@v4", +} + HEADER = dedent( """\ # GENERATED, DO NOT EDIT! @@ -153,7 +170,7 @@ def ensure_category_label() -> Sequence[Step]: { "if": "github.event_name == 'pull_request'", "name": "Ensure category label", - "uses": "mheap/github-action-required-labels@v4.0.0", + "uses": ACTION["github-action-required-labels"], "env": {"GITHUB_TOKEN": gha_expr("secrets.GITHUB_TOKEN")}, "with": { "mode": "exactly", @@ -180,7 +197,7 @@ def ensure_release_notes() -> Sequence[Step]: # out via a label. "if": "github.event_name == 'pull_request' && !needs.classify_changes.outputs.notes", "name": "Ensure appropriate label", - "uses": "mheap/github-action-required-labels@v4.0.0", + "uses": ACTION["github-action-required-labels"], "env": {"GITHUB_TOKEN": gha_expr("secrets.GITHUB_TOKEN")}, "with": { "mode": "minimum", @@ -220,7 +237,7 @@ def checkout( # We need to fetch a few commits back, to be able to access HEAD^2 in the PR case. { "name": "Check out code", - "uses": "actions/checkout@v3", + "uses": ACTION["checkout"], "with": { **fetch_depth_opt, **({"ref": ref} if ref else {}), @@ -322,7 +339,7 @@ def install_rustup() -> Step: def install_python(version: str) -> Step: return { "name": f"Set up Python {version}", - "uses": "actions/setup-python@v4", + "uses": ACTION["setup-python"], "with": {"python-version": version}, } @@ -330,7 +347,7 @@ def install_python(version: str) -> Step: def install_node(version: str) -> Step: return { "name": f"Set up Node {version}", - "uses": "actions/setup-node@v3", + "uses": ACTION["setup-node"], "with": {"node-version": version}, } @@ -338,7 +355,7 @@ def install_node(version: str) -> Step: def install_jdk() -> Step: return { "name": "Install AdoptJDK", - "uses": "actions/setup-java@v3", + "uses": ACTION["setup-java"], "with": { "distribution": "adopt", "java-version": "11", @@ -349,7 +366,7 @@ def install_jdk() -> Step: def install_go() -> Step: return { "name": "Install Go", - "uses": "actions/setup-go@v3", + "uses": ACTION["setup-go"], "with": {"go-version": "1.19.5"}, } @@ -360,7 +377,7 @@ def install_go() -> Step: def install_protoc() -> Step: return { "name": "Install Protoc", - "uses": "arduino/setup-protoc@9b1ee5b22b0a3f1feb8c2ff99b32c89b3c3191e9", + "uses": ACTION["setup-protoc"], "with": { "version": "23.x", "repo-token": "${{ secrets.GITHUB_TOKEN }}", @@ -453,7 +470,7 @@ def wrap_cmd(self, cmd: str) -> str: def native_binaries_upload(self) -> Step: return { "name": "Upload native binaries", - "uses": "actions/upload-artifact@v3", + "uses": ACTION["upload-artifact"], "with": { "name": f"native_binaries.{gha_expr('matrix.python-version')}.{self.platform_name()}", "path": "\n".join(NATIVE_FILES), @@ -464,7 +481,7 @@ def native_binaries_download(self) -> Sequence[Step]: return [ { "name": "Download native binaries", - "uses": "actions/download-artifact@v3", + "uses": ACTION["download-artifact"], "with": { "name": f"native_binaries.{gha_expr('matrix.python-version')}.{self.platform_name()}", "path": NATIVE_FILES_COMMON_PREFIX, @@ -485,7 +502,7 @@ def rust_caches(self) -> Sequence[Step]: }, { "name": "Cache Rust toolchain", - "uses": "actions/cache@v3", + "uses": ACTION["cache"], "with": { "path": f"~/.rustup/toolchains/{rust_channel()}-*\n~/.rustup/update-hashes\n~/.rustup/settings.toml\n", "key": f"{self.platform_name()}-rustup-{hash_files('src/rust/engine/rust-toolchain')}-v2", @@ -493,7 +510,7 @@ def rust_caches(self) -> Sequence[Step]: }, { "name": "Cache Cargo", - "uses": "benjyw/rust-cache@461b9f8eee66b575bce78977bf649b8b7a8d53f1", + "uses": ACTION["rust-cache"], "with": { # If set, replaces the job id in the cache key, so that the cache is stable across jobs. # If we don't set this, each job may restore from a previous job's cache entry (via a @@ -523,7 +540,7 @@ def bootstrap_caches(self) -> Sequence[Step]: }, { "name": "Cache native engine", - "uses": "actions/cache@v3", + "uses": ACTION["cache"], "with": { "path": "\n".join(NATIVE_FILES), "key": f"{self.platform_name()}-engine-{gha_expr('steps.get-engine-hash.outputs.hash')}-v1", @@ -547,7 +564,7 @@ def expose_all_pythons(self) -> Sequence[Step]: ret.append( { "name": "Expose Pythons", - "uses": "pantsbuild/actions/expose-pythons@627a8ce25d972afa03da1641be9261bbbe0e3ffe", + "uses": ACTION["expose-pythons"], } ) return ret @@ -584,12 +601,13 @@ def bootstrap_pants(self) -> Sequence[Step]: def upload_log_artifacts(self, name: str) -> Step: return { "name": "Upload pants.log", - "uses": "actions/upload-artifact@v3", + "uses": ACTION["upload-artifact"], "if": "always()", "continue-on-error": True, "with": { "name": f"logs-{name.replace('/', '_')}-{self.platform_name()}", "path": ".pants.d/workdir/*.log", + "overwrite": "true", }, } @@ -1218,7 +1236,7 @@ def release_jobs_and_inputs() -> tuple[Jobs, dict[str, Any]]: "steps": [ { "name": "Checkout Pants at Release Tag", - "uses": "actions/checkout@v3", + "uses": ACTION["checkout"], "with": { # N.B.: We need the last few edits to VERSION. Instead of guessing, just # clone the repo, we're not so big as to need to optimize this. @@ -1241,7 +1259,7 @@ def release_jobs_and_inputs() -> tuple[Jobs, dict[str, Any]]: }, { "name": "Announce to Slack", - "uses": "slackapi/slack-github-action@v1.24.0", + "uses": ACTION["slack-github-action"], "with": { "channel-id": "C18RRR4JK", "payload-file-path": "${{ runner.temp }}/slack_announcement.json", @@ -1250,7 +1268,7 @@ def release_jobs_and_inputs() -> tuple[Jobs, dict[str, Any]]: }, { "name": "Announce to pants-devel", - "uses": "dawidd6/action-send-mail@v3.8.0", + "uses": ACTION["action-send-mail"], "with": { # Note: Email is sent from the dedicated account pants.announce@gmail.com. # The EMAIL_CONNECTION_URL should be of the form: