Skip to content

Commit

Permalink
Use current GitHub Actions versions (and avoid ::set-output) (#520)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jmarshall authored Sep 18, 2023
1 parent 78cafc7 commit f128b70
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand All @@ -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 }}')

0 comments on commit f128b70

Please sign in to comment.