From c71b528148c55913ecfb87e3afcf944a9b1e856f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= <76261501+zecakeh@users.noreply.github.com> Date: Wed, 11 Oct 2023 12:23:16 +0200 Subject: [PATCH] Upgrade GitHub actions (#1660) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Upgrade most github actions Gets rid of warning in CI complaining about those actions using node 12. Signed-off-by: Kรฉvin Commaille * Upgrade node version used to run scripts Use the latest LTS Signed-off-by: Kรฉvin Commaille * Add changelog Signed-off-by: Kรฉvin Commaille --- .github/workflows/checks.yaml | 2 +- .github/workflows/main.yml | 44 +++++++++---------- .github/workflows/netlify.yaml | 6 +-- .github/workflows/release.yaml | 2 +- .github/workflows/spell-check.yaml | 2 +- .../internal/newsfragments/1660.clarification | 1 + 6 files changed, 29 insertions(+), 28 deletions(-) create mode 100644 changelogs/internal/newsfragments/1660.clarification diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 083d6831..694962d1 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -10,7 +10,7 @@ jobs: if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - run: scripts/check-newsfragments diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0bdf4155..c28a3329 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,11 +18,11 @@ jobs: runs-on: ubuntu-latest steps: - name: "๐Ÿ“ฅ Source checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "โž• Setup Node" - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '18' - name: "๐Ÿ”Ž Run validator" run: | npx @redocly/cli@latest lint data/api/*/*.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "๐Ÿ“ฅ Source checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "โž• Setup Python" uses: actions/setup-python@v4 with: @@ -74,7 +74,7 @@ jobs: needs: [calculate-baseurl] steps: - name: "๐Ÿ“ฅ Source checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "โž• Setup Python" uses: actions/setup-python@v4 with: @@ -114,7 +114,7 @@ jobs: -o spec/server-server-api/api.json tar -czf openapi.tar.gz spec - name: "๐Ÿ“ค Artifact upload" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: openapi-artifact path: openapi.tar.gz @@ -126,7 +126,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "๐Ÿ“ฅ Source checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "โž• Setup Python" uses: actions/setup-python@v4 - name: "โž• Install towncrier" @@ -134,7 +134,7 @@ jobs: - name: "Generate changelog" run: ./scripts/generate-changelog.sh vUNSTABLE - name: "๐Ÿ“ค Artifact upload" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: changelog-artifact path: content/changelog/vUNSTABLE.md @@ -147,16 +147,16 @@ jobs: if: ${{ always() }} steps: - name: "โž• Setup Node" - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '18' - name: "โž• Setup Hugo" - uses: peaceiris/actions-hugo@c03b5dbed22245418539b65eb9a3b1d5fdd9a0a6 + uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d with: hugo-version: '0.113.0' extended: true - name: "๐Ÿ“ฅ Source checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "โš™๏ธ npm" run: | npm i @@ -174,7 +174,7 @@ jobs: # https://spec.matrix.org/latest/client-server-api/api.json # Works for /unstable/ and /v1.1/ as well. - name: "๐Ÿ“ฅ Spec definition download" - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: openapi-artifact - name: "๐Ÿ“ Unpack the OpenAPI definitions in the right location" @@ -184,7 +184,7 @@ jobs: - name: "๐Ÿ“ฆ Tarball creation" run: tar -czf spec.tar.gz spec - name: "๐Ÿ“ค Artifact upload" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: spec-artifact path: spec.tar.gz @@ -195,10 +195,10 @@ jobs: needs: [calculate-baseurl, build-spec] steps: - name: "๐Ÿ“ฅ Source checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "๐Ÿ“ฅ Fetch built spec" - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: spec-artifact @@ -224,16 +224,16 @@ jobs: if: ${{ startsWith(github.ref, 'refs/tags/') }} steps: - name: "โž• Setup Node" - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '18' - name: "โž• Setup Hugo" - uses: peaceiris/actions-hugo@c03b5dbed22245418539b65eb9a3b1d5fdd9a0a6 + uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d with: hugo-version: '0.93.3' extended: true - name: "๐Ÿ“ฅ Source checkout" - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "โš™๏ธ npm" run: | npm i @@ -245,7 +245,7 @@ jobs: hugo --config config.toml,historical.toml --baseURL "/${GITHUB_REF/refs\/tags\//}" -d "spec" - name: "๐Ÿ“ฅ Spec definition download" - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: openapi-artifact - name: "๐Ÿ“ Unpack the OpenAPI definitions in the right location" @@ -255,7 +255,7 @@ jobs: - name: "๐Ÿ“ฆ Tarball creation" run: tar -czf spec-historical.tar.gz spec - name: "๐Ÿ“ค Artifact upload" - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: spec-historical-artifact path: spec-historical.tar.gz diff --git a/.github/workflows/netlify.yaml b/.github/workflows/netlify.yaml index 83b6bec5..fb2d05c9 100644 --- a/.github/workflows/netlify.yaml +++ b/.github/workflows/netlify.yaml @@ -35,7 +35,7 @@ jobs: echo "::set-output name=prnumber::$pr_number" - name: '๐Ÿ“ฅ Download artifact' - uses: dawidd6/action-download-artifact@af92a8455a59214b7b932932f2662fdefbd78126 # v2.15.0 + uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0 with: workflow: main.yaml run_id: ${{ github.event.workflow_run.id }} @@ -46,8 +46,8 @@ jobs: - name: "๐Ÿ“ค Deploy to Netlify" id: netlify - # v1.2.2 - uses: nwtgck/actions-netlify@f517512ae75beec8896aa7b027c1c72f01816200 + # v2.1.0 + uses: nwtgck/actions-netlify@7a92f00dde8c92a5a9e8385ec2919775f7647352 with: publish-dir: spec deploy-message: "Deploy from GitHub Actions" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0c3ae5a2..ef4162d8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,7 +14,7 @@ jobs: working-directory: packages/npm steps: - name: ๐Ÿงฎ Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: ๐Ÿ”ง Yarn cache uses: actions/setup-node@v3 diff --git a/.github/workflows/spell-check.yaml b/.github/workflows/spell-check.yaml index d0b4a40e..4ed2930c 100644 --- a/.github/workflows/spell-check.yaml +++ b/.github/workflows/spell-check.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Check spelling of proposals uses: crate-ci/typos@9be36f97fdbe645ee9a12449fb13aca856c2516a diff --git a/changelogs/internal/newsfragments/1660.clarification b/changelogs/internal/newsfragments/1660.clarification new file mode 100644 index 00000000..3e7c7e94 --- /dev/null +++ b/changelogs/internal/newsfragments/1660.clarification @@ -0,0 +1 @@ +Upgrade GitHub actions.