From ec99132a48461654707658178af63440d0b33f8a Mon Sep 17 00:00:00 2001 From: Brad Corso Date: Wed, 6 Nov 2024 08:05:44 -0800 Subject: [PATCH] Update GitHub Action dependencies. Both actions/upload-artifact@v3 and actions/download-artifact@v3 will be deprecated in a couple weeks so I've updated them to @v4. I've updated our other dependencies to @v4 as well. RELNOTES=N/A PiperOrigin-RevId: 693730715 --- .../action.yml | 10 +++---- .../artifact-android-local-tests/action.yml | 10 +++---- .../artifact-java-local-tests/action.yml | 6 ++-- .../artifact-verification-tests/action.yml | 6 ++-- .github/actions/bazel-build/action.yml | 8 ++--- .github/actions/bazel-test/action.yml | 10 +++---- .../actions/build-gradle-plugin/action.yml | 10 +++---- .github/actions/cleanup-caches/action.yml | 2 +- .github/actions/prechecks/action.yml | 4 +-- .github/actions/test-gradle-plugin/action.yml | 12 ++++---- .github/workflows/ci.yml | 30 +++++++++---------- .github/workflows/release.yml | 24 +++++++-------- 12 files changed, 66 insertions(+), 66 deletions(-) diff --git a/.github/actions/artifact-android-emulator-tests/action.yml b/.github/actions/artifact-android-emulator-tests/action.yml index 2fc298797df..93494f020a7 100644 --- a/.github/actions/artifact-android-emulator-tests/action.yml +++ b/.github/actions/artifact-android-emulator-tests/action.yml @@ -10,9 +10,9 @@ runs: using: "composite" steps: - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cache Gradle files' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -21,12 +21,12 @@ runs: restore-keys: | ${{ runner.os }}-gradle- - name: 'Download local snapshot for tests' - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: local-snapshot path: ~/.m2/repository/com/google/dagger - name: 'Install Java ${{ env.USE_JAVA_VERSION }}' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' java-version: '${{ env.USE_JAVA_VERSION }}' @@ -38,7 +38,7 @@ runs: script: ./util/run-local-emulator-tests.sh - name: 'Upload test reports (API ${{ inputs.api-level }})' if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: androidTests-report-api-${{ inputs.api-level }} path: ${{ github.workspace }}/**/build/reports/androidTests/connected/* diff --git a/.github/actions/artifact-android-local-tests/action.yml b/.github/actions/artifact-android-local-tests/action.yml index 967522d143e..b16ab13aa9b 100644 --- a/.github/actions/artifact-android-local-tests/action.yml +++ b/.github/actions/artifact-android-local-tests/action.yml @@ -20,9 +20,9 @@ runs: using: "composite" steps: - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cache Gradle files' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -31,12 +31,12 @@ runs: restore-keys: | ${{ runner.os }}-gradle- - name: 'Download local snapshot for tests' - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: local-snapshot path: ~/.m2/repository/com/google/dagger - name: 'Install Java ${{ inputs.jdk }}' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' java-version: '${{ inputs.jdk }}' @@ -45,7 +45,7 @@ runs: shell: bash - name: 'Upload test reports (AGP ${{ inputs.agp }})' if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: tests-reports-agp-${{ inputs.agp }} path: ${{ github.workspace }}/**/build/reports/tests/* diff --git a/.github/actions/artifact-java-local-tests/action.yml b/.github/actions/artifact-java-local-tests/action.yml index e3cf770fa11..bfe997a1fcb 100644 --- a/.github/actions/artifact-java-local-tests/action.yml +++ b/.github/actions/artifact-java-local-tests/action.yml @@ -5,9 +5,9 @@ runs: using: "composite" steps: - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cache Gradle files' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -16,7 +16,7 @@ runs: restore-keys: | ${{ runner.os }}-gradle- - name: 'Download local snapshot for tests' - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: local-snapshot path: ~/.m2/repository/com/google/dagger diff --git a/.github/actions/artifact-verification-tests/action.yml b/.github/actions/artifact-verification-tests/action.yml index 96e37925fb9..30b44fda391 100644 --- a/.github/actions/artifact-verification-tests/action.yml +++ b/.github/actions/artifact-verification-tests/action.yml @@ -5,9 +5,9 @@ runs: using: "composite" steps: - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cache Gradle files' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -16,7 +16,7 @@ runs: restore-keys: | ${{ runner.os }}-gradle- - name: 'Download local snapshot for tests' - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: local-snapshot path: ~/.m2/repository/com/google/dagger diff --git a/.github/actions/bazel-build/action.yml b/.github/actions/bazel-build/action.yml index c464dfe7d59..ab820b48027 100644 --- a/.github/actions/bazel-build/action.yml +++ b/.github/actions/bazel-build/action.yml @@ -5,14 +5,14 @@ runs: using: "composite" steps: - name: 'Install Java ${{ env.USE_JAVA_VERSION }}' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' java-version: '${{ env.USE_JAVA_VERSION }}' - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cache Bazel files' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/bazel key: ${{ runner.os }}-bazel-build-${{ github.sha }} @@ -28,7 +28,7 @@ runs: run: ./util/install-local-snapshot.sh shell: bash - name: 'Upload local snapshot for tests' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: local-snapshot path: ~/.m2/repository/com/google/dagger diff --git a/.github/actions/bazel-test/action.yml b/.github/actions/bazel-test/action.yml index d84f061917a..9f825466c3a 100644 --- a/.github/actions/bazel-test/action.yml +++ b/.github/actions/bazel-test/action.yml @@ -5,14 +5,14 @@ runs: using: "composite" steps: - name: 'Install Java ${{ env.USE_JAVA_VERSION }}' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' java-version: '${{ env.USE_JAVA_VERSION }}' - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cache local Maven repository' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.m2/repository @@ -21,7 +21,7 @@ runs: restore-keys: | ${{ runner.os }}-maven- - name: 'Cache Bazel files' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/bazel # Note: we could use the same key as bazel-build, but we separate them @@ -31,7 +31,7 @@ runs: restore-keys: | ${{ runner.os }}-bazel-test- - name: 'Cache Gradle files' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.gradle/caches diff --git a/.github/actions/build-gradle-plugin/action.yml b/.github/actions/build-gradle-plugin/action.yml index 4fb32932fb9..31a53674a54 100644 --- a/.github/actions/build-gradle-plugin/action.yml +++ b/.github/actions/build-gradle-plugin/action.yml @@ -10,14 +10,14 @@ runs: using: "composite" steps: - name: 'Install Java ${{ env.USE_JAVA_VERSION }}' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' java-version: '${{ env.USE_JAVA_VERSION }}' - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cache local Maven repository' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.m2/repository @@ -26,14 +26,14 @@ runs: restore-keys: | ${{ runner.os }}-maven- - name: 'Cache Bazel files' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/bazel key: ${{ runner.os }}-bazel-build-${{ github.sha }} restore-keys: | ${{ runner.os }}-bazel-build- - name: 'Cache Gradle files' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.gradle/caches diff --git a/.github/actions/cleanup-caches/action.yml b/.github/actions/cleanup-caches/action.yml index 294d624517c..0197d8fbb95 100644 --- a/.github/actions/cleanup-caches/action.yml +++ b/.github/actions/cleanup-caches/action.yml @@ -5,7 +5,7 @@ runs: using: "composite" steps: - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cleanup caches' run: python ./util/cleanup-github-caches.py shell: bash diff --git a/.github/actions/prechecks/action.yml b/.github/actions/prechecks/action.yml index 09dc5d9cd75..1a04552a75d 100644 --- a/.github/actions/prechecks/action.yml +++ b/.github/actions/prechecks/action.yml @@ -11,7 +11,7 @@ runs: with: access_token: ${{ github.token }} - name: 'Check out gh-pages repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: 'refs/heads/gh-pages' path: gh-pages @@ -21,7 +21,7 @@ runs: env: GH_TOKEN: ${{ github.token }} - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cleanup caches' run: python ./util/cleanup-github-caches.py shell: bash diff --git a/.github/actions/test-gradle-plugin/action.yml b/.github/actions/test-gradle-plugin/action.yml index bd5747294e9..162d9e67259 100644 --- a/.github/actions/test-gradle-plugin/action.yml +++ b/.github/actions/test-gradle-plugin/action.yml @@ -5,14 +5,14 @@ runs: using: "composite" steps: - name: 'Install Java ${{ env.USE_JAVA_VERSION_FOR_PLUGIN }}' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' java-version: '${{ env.USE_JAVA_VERSION_FOR_PLUGIN }}' - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cache local Maven repository' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.m2/repository @@ -21,14 +21,14 @@ runs: restore-keys: | ${{ runner.os }}-maven- - name: 'Cache Bazel files' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/bazel key: ${{ runner.os }}-bazel-build-${{ github.sha }} restore-keys: | ${{ runner.os }}-bazel-build- - name: 'Cache Gradle files' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -37,7 +37,7 @@ runs: restore-keys: | ${{ runner.os }}-gradle- - name: 'Download local snapshot for tests' - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: local-snapshot path: ~/.m2/repository/com/google/dagger diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b2068690fa..e4dba252afe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,14 +22,14 @@ jobs: name: 'Validate Dagger version' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/prechecks bazel-build: name: 'Bazel build' needs: validate-latest-dagger-version runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/bazel-build bazel-test: name: 'Bazel tests' @@ -38,28 +38,28 @@ jobs: group: large-runner-group labels: ubuntu-22.04-16core steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/bazel-test artifact-verification-tests: name: 'Artifact verification tests' needs: bazel-build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/artifact-verification-tests artifact-java-local-tests: name: 'Artifact Java local tests' needs: bazel-build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/artifact-java-local-tests test-gradle-plugin: name: 'Test Hilt Gradle plugin' needs: bazel-build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/test-gradle-plugin artifact-android-local-tests: name: 'Artifact Android local tests (AGP ${{ matrix.agp }})' @@ -71,7 +71,7 @@ jobs: - agp: '8.1.1' jdk: '17' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/artifact-android-local-tests with: agp: '${{ matrix.agp }}' @@ -89,7 +89,7 @@ jobs: matrix: # Run on 16 (PreL), 21 (L), and 26 (O). api-level: [16, 21, 26, 30] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/artifact-android-emulator-tests timeout-minutes: 35 with: @@ -109,7 +109,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Install Java ${{ env.USE_JAVA_VERSION }}' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' java-version: '${{ env.USE_JAVA_VERSION }}' @@ -117,9 +117,9 @@ jobs: server-username: CI_DEPLOY_USERNAME server-password: CI_DEPLOY_PASSWORD - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cache local Maven repository' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.m2/repository @@ -128,14 +128,14 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: 'Cache Bazel files' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/bazel key: ${{ runner.os }}-bazel-build-${{ github.sha }} restore-keys: | ${{ runner.os }}-bazel-build- - name: 'Cache Gradle files' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -175,7 +175,7 @@ jobs: needs: bazel-build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/build-gradle-plugin with: agp: '+' @@ -192,5 +192,5 @@ jobs: ] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/cleanup-caches diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a182b71269..8c0904c8ce4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,14 +24,14 @@ jobs: name: 'Validate Dagger version' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/prechecks bazel-build: name: 'Bazel build' needs: validate-latest-dagger-version runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/bazel-build bazel-test: name: 'Bazel tests' @@ -40,28 +40,28 @@ jobs: group: large-runner-group labels: ubuntu-22.04-16core steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/bazel-test artifact-verification-tests: name: 'Artifact verification tests' needs: bazel-build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/artifact-verification-tests artifact-java-local-tests: name: 'Artifact Java local tests' needs: bazel-build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/artifact-java-local-tests test-gradle-plugin: name: 'Test Hilt Gradle plugin' needs: bazel-build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/test-gradle-plugin artifact-android-local-tests: name: 'Artifact Android local tests (AGP ${{ matrix.agp }})' @@ -73,7 +73,7 @@ jobs: - agp: '8.1.1' jdk: '17' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/artifact-android-local-tests with: agp: '${{ matrix.agp }}' @@ -90,7 +90,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Install Java ${{ env.USE_JAVA_VERSION }}' - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' java-version: '${{ env.USE_JAVA_VERSION }}' @@ -100,9 +100,9 @@ jobs: gpg-private-key: ${{ secrets.CI_GPG_PRIVATE_KEY }} gpg-passphrase: CI_GPG_PASSPHRASE - name: 'Check out repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Cache local Maven repository' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.m2/repository @@ -111,14 +111,14 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: 'Cache Bazel files' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/bazel key: ${{ runner.os }}-bazel-build-${{ github.sha }} restore-keys: | ${{ runner.os }}-bazel-build- - name: 'Cache Gradle files' - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches