From d1428f95f71e28b9c9fc916ef6d5bb08cebbf5d4 Mon Sep 17 00:00:00 2001 From: Andreas Stenius Date: Mon, 15 Jul 2024 14:42:31 +0200 Subject: [PATCH] Bump workflow actions for node20 (#21133) 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 --- .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 | 52 ++-- 6 files changed, 227 insertions(+), 185 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 aa15f434c7b..3e8ae465320 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.77.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 9269eec6257..415cb6f55df 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.77.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.77.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.77.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.77.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.77.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: @@ -576,7 +583,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - id: classify @@ -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 - env: @@ -620,11 +627,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 @@ -637,9 +644,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: @@ -701,16 +709,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 @@ -736,9 +744,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: @@ -753,7 +762,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -775,12 +784,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' @@ -795,13 +804,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 @@ -827,9 +836,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: @@ -844,7 +854,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -866,12 +876,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' @@ -886,13 +896,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 @@ -918,9 +928,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: @@ -935,7 +946,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -957,12 +968,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' @@ -977,13 +988,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 @@ -1009,9 +1020,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: @@ -1026,7 +1038,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1048,12 +1060,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' @@ -1068,13 +1080,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 @@ -1100,9 +1112,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: @@ -1117,7 +1130,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1139,12 +1152,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' @@ -1159,13 +1172,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 @@ -1191,9 +1204,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: @@ -1208,7 +1222,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1230,12 +1244,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' @@ -1250,13 +1264,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 @@ -1282,9 +1296,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: @@ -1299,7 +1314,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1321,12 +1336,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' @@ -1341,13 +1356,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 @@ -1373,9 +1388,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: @@ -1390,7 +1406,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1412,12 +1428,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' @@ -1432,13 +1448,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 @@ -1464,9 +1480,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: @@ -1481,7 +1498,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1503,12 +1520,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' @@ -1523,13 +1540,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 @@ -1555,9 +1572,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: @@ -1572,7 +1590,7 @@ jobs: - ubuntu-20.04 steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 10 - env: @@ -1594,12 +1612,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' @@ -1614,13 +1632,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 @@ -1646,9 +1664,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: @@ -1663,22 +1682,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 @@ -1704,9 +1723,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 4bf127efcfd..e87f41873ca 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! @@ -152,7 +169,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", @@ -184,7 +201,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 {}), @@ -286,7 +303,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}, } @@ -294,7 +311,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}, } @@ -302,7 +319,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", @@ -313,7 +330,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"}, } @@ -324,7 +341,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 }}", @@ -417,7 +434,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), @@ -428,7 +445,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, @@ -449,7 +466,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", @@ -457,7 +474,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 @@ -487,7 +504,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", @@ -511,7 +528,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 @@ -548,12 +565,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", }, } @@ -1175,7 +1193,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. @@ -1198,7 +1216,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", @@ -1207,7 +1225,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: