From f128b70ca71d33537c9d0922f196901dc3f23d2f Mon Sep 17 00:00:00 2001 From: John Marshall Date: Mon, 18 Sep 2023 15:33:57 +1200 Subject: [PATCH] Use current GitHub Actions versions (and avoid ::set-output) (#520) Prevent "The following action(s) uses node12 which is deprecated" warnings by updating to the current releases of the Actions used. (Node.js 12 is scheduled for removal from Actions runners next month.) Use the current releases instead of `@main` too, as we don't want to be affected by bleeding-edge bugs. Rewrite ::set-output as a write to $GITHUB_OUTPUT instead; the ::save-state and ::set-output commands are also deprecated. --- .github/workflows/deploy.yaml | 8 ++++---- .github/workflows/lint.yaml | 4 ++-- .github/workflows/test.yaml | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index ca5c077f1..997b1129d 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -21,10 +21,10 @@ jobs: run: shell: bash -eo pipefail -l {0} steps: - - uses: actions/checkout@main + - uses: actions/checkout@v3 - name: "gcloud setup" - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v1 with: project_id: sample-metadata service_account_key: ${{ secrets.GCP_SERVER_DEPLOY_KEY }} @@ -33,11 +33,11 @@ jobs: run: | gcloud auth configure-docker australia-southeast1-docker.pkg.dev - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: "3.10" - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: distribution: "temurin" # See 'Supported distributions' for available options java-version: "17" diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 68f65dc86..71c330c5a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -14,9 +14,9 @@ jobs: run: shell: bash -eo pipefail -l {0} steps: - - uses: actions/checkout@main + - uses: actions/checkout@v3 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: "3.10" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index aaffc014b..e15e52f8e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,13 +16,13 @@ jobs: run: shell: bash -eo pipefail -l {0} steps: - - uses: actions/checkout@main + - uses: actions/checkout@v3 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: "3.10" - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: distribution: "temurin" # See 'Supported distributions' for available options java-version: "17" @@ -70,10 +70,10 @@ jobs: rc=$? coverage xml - echo "::set-output name=rc::$rc" + echo "rc=$rc" >> $GITHUB_OUTPUT - name: "Upload coverage report" - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: files: ./coverage.xml @@ -89,7 +89,7 @@ jobs: - name: Fail if tests are not passing if: ${{ steps.runtests.outputs.rc != 0 }} - uses: actions/github-script@v3 + uses: actions/github-script@v6 with: script: | core.setFailed('Unit tests failed with rc = ${{ steps.runtests.outputs.rc }}')