Upgrade GitHub actions (#1660)

* Upgrade most github actions

Gets rid of warning in CI complaining about those actions
using node 12.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Upgrade node version used to run scripts

Use the latest LTS

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
pull/1671/head
Kévin Commaille 1 year ago committed by GitHub
parent 7fb9e99071
commit c71b528148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,7 +10,7 @@ jobs:
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- run: scripts/check-newsfragments - run: scripts/check-newsfragments

@ -18,11 +18,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: "📥 Source checkout" - name: "📥 Source checkout"
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: " Setup Node" - name: " Setup Node"
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '18'
- name: "🔎 Run validator" - name: "🔎 Run validator"
run: | run: |
npx @redocly/cli@latest lint data/api/*/*.yaml npx @redocly/cli@latest lint data/api/*/*.yaml
@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: "📥 Source checkout" - name: "📥 Source checkout"
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: " Setup Python" - name: " Setup Python"
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
@ -74,7 +74,7 @@ jobs:
needs: [calculate-baseurl] needs: [calculate-baseurl]
steps: steps:
- name: "📥 Source checkout" - name: "📥 Source checkout"
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: " Setup Python" - name: " Setup Python"
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
@ -114,7 +114,7 @@ jobs:
-o spec/server-server-api/api.json -o spec/server-server-api/api.json
tar -czf openapi.tar.gz spec tar -czf openapi.tar.gz spec
- name: "📤 Artifact upload" - name: "📤 Artifact upload"
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: openapi-artifact name: openapi-artifact
path: openapi.tar.gz path: openapi.tar.gz
@ -126,7 +126,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: "📥 Source checkout" - name: "📥 Source checkout"
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: " Setup Python" - name: " Setup Python"
uses: actions/setup-python@v4 uses: actions/setup-python@v4
- name: " Install towncrier" - name: " Install towncrier"
@ -134,7 +134,7 @@ jobs:
- name: "Generate changelog" - name: "Generate changelog"
run: ./scripts/generate-changelog.sh vUNSTABLE run: ./scripts/generate-changelog.sh vUNSTABLE
- name: "📤 Artifact upload" - name: "📤 Artifact upload"
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: changelog-artifact name: changelog-artifact
path: content/changelog/vUNSTABLE.md path: content/changelog/vUNSTABLE.md
@ -147,16 +147,16 @@ jobs:
if: ${{ always() }} if: ${{ always() }}
steps: steps:
- name: " Setup Node" - name: " Setup Node"
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '18'
- name: " Setup Hugo" - name: " Setup Hugo"
uses: peaceiris/actions-hugo@c03b5dbed22245418539b65eb9a3b1d5fdd9a0a6 uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d
with: with:
hugo-version: '0.113.0' hugo-version: '0.113.0'
extended: true extended: true
- name: "📥 Source checkout" - name: "📥 Source checkout"
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: "⚙️ npm" - name: "⚙️ npm"
run: | run: |
npm i npm i
@ -174,7 +174,7 @@ jobs:
# https://spec.matrix.org/latest/client-server-api/api.json # https://spec.matrix.org/latest/client-server-api/api.json
# Works for /unstable/ and /v1.1/ as well. # Works for /unstable/ and /v1.1/ as well.
- name: "📥 Spec definition download" - name: "📥 Spec definition download"
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: openapi-artifact name: openapi-artifact
- name: "📝 Unpack the OpenAPI definitions in the right location" - name: "📝 Unpack the OpenAPI definitions in the right location"
@ -184,7 +184,7 @@ jobs:
- name: "📦 Tarball creation" - name: "📦 Tarball creation"
run: tar -czf spec.tar.gz spec run: tar -czf spec.tar.gz spec
- name: "📤 Artifact upload" - name: "📤 Artifact upload"
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: spec-artifact name: spec-artifact
path: spec.tar.gz path: spec.tar.gz
@ -195,10 +195,10 @@ jobs:
needs: [calculate-baseurl, build-spec] needs: [calculate-baseurl, build-spec]
steps: steps:
- name: "📥 Source checkout" - name: "📥 Source checkout"
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: "📥 Fetch built spec" - name: "📥 Fetch built spec"
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: spec-artifact name: spec-artifact
@ -224,16 +224,16 @@ jobs:
if: ${{ startsWith(github.ref, 'refs/tags/') }} if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps: steps:
- name: " Setup Node" - name: " Setup Node"
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '18'
- name: " Setup Hugo" - name: " Setup Hugo"
uses: peaceiris/actions-hugo@c03b5dbed22245418539b65eb9a3b1d5fdd9a0a6 uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d
with: with:
hugo-version: '0.93.3' hugo-version: '0.93.3'
extended: true extended: true
- name: "📥 Source checkout" - name: "📥 Source checkout"
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: "⚙️ npm" - name: "⚙️ npm"
run: | run: |
npm i npm i
@ -245,7 +245,7 @@ jobs:
hugo --config config.toml,historical.toml --baseURL "/${GITHUB_REF/refs\/tags\//}" -d "spec" hugo --config config.toml,historical.toml --baseURL "/${GITHUB_REF/refs\/tags\//}" -d "spec"
- name: "📥 Spec definition download" - name: "📥 Spec definition download"
uses: actions/download-artifact@v2 uses: actions/download-artifact@v3
with: with:
name: openapi-artifact name: openapi-artifact
- name: "📝 Unpack the OpenAPI definitions in the right location" - name: "📝 Unpack the OpenAPI definitions in the right location"
@ -255,7 +255,7 @@ jobs:
- name: "📦 Tarball creation" - name: "📦 Tarball creation"
run: tar -czf spec-historical.tar.gz spec run: tar -czf spec-historical.tar.gz spec
- name: "📤 Artifact upload" - name: "📤 Artifact upload"
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: spec-historical-artifact name: spec-historical-artifact
path: spec-historical.tar.gz path: spec-historical.tar.gz

@ -35,7 +35,7 @@ jobs:
echo "::set-output name=prnumber::$pr_number" echo "::set-output name=prnumber::$pr_number"
- name: '📥 Download artifact' - name: '📥 Download artifact'
uses: dawidd6/action-download-artifact@af92a8455a59214b7b932932f2662fdefbd78126 # v2.15.0 uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
with: with:
workflow: main.yaml workflow: main.yaml
run_id: ${{ github.event.workflow_run.id }} run_id: ${{ github.event.workflow_run.id }}
@ -46,8 +46,8 @@ jobs:
- name: "📤 Deploy to Netlify" - name: "📤 Deploy to Netlify"
id: netlify id: netlify
# v1.2.2 # v2.1.0
uses: nwtgck/actions-netlify@f517512ae75beec8896aa7b027c1c72f01816200 uses: nwtgck/actions-netlify@7a92f00dde8c92a5a9e8385ec2919775f7647352
with: with:
publish-dir: spec publish-dir: spec
deploy-message: "Deploy from GitHub Actions" deploy-message: "Deploy from GitHub Actions"

@ -14,7 +14,7 @@ jobs:
working-directory: packages/npm working-directory: packages/npm
steps: steps:
- name: 🧮 Checkout code - name: 🧮 Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: 🔧 Yarn cache - name: 🔧 Yarn cache
uses: actions/setup-node@v3 uses: actions/setup-node@v3

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Actions Repository - name: Checkout Actions Repository
uses: actions/checkout@v2 uses: actions/checkout@v4
- name: Check spelling of proposals - name: Check spelling of proposals
uses: crate-ci/typos@9be36f97fdbe645ee9a12449fb13aca856c2516a uses: crate-ci/typos@9be36f97fdbe645ee9a12449fb13aca856c2516a

Loading…
Cancel
Save