Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(gh-actions): bump GitHub workflow actions to latest versions #3917

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Expand Up @@ -11,14 +11,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false # minimize exposure and prevent accidental pushes

- name: Use Node.js 16
uses: actions/setup-node@v3
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '18'
cache: yarn

- name: Install dependencies
Expand Down Expand Up @@ -52,15 +52,15 @@ jobs:
needs: test

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Use Node.js 16
uses: actions/setup-node@v3
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '18'
cache: yarn

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/fonts.yml
Expand Up @@ -16,13 +16,13 @@ jobs:
pull-requests: write # to remove label

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ format('refs/pull/{0}/merge', github.event.pull_request.number) }}
persist-credentials: false # minimize exposure and prevent accidental pushes

- name: Remove label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -35,7 +35,7 @@ jobs:

- name: Check image
id: check-image
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
# https://github.community/t/github-token-has-no-access-to-new-container-rest-apis/170395
github-token: ${{ secrets.GH_PACKAGES_TOKEN }}
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:

- name: Login to GitHub Container Registry
if: ${{ !fromJSON(steps.check-image.outputs.exists) }}
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: KaTeX-bot
Expand All @@ -72,7 +72,7 @@ jobs:

- name: Build and push
if: ${{ !fromJSON(steps.check-image.outputs.exists) }}
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: dockers/fonts
tags: ${{ steps.check-image.outputs.result }}
Expand All @@ -89,7 +89,7 @@ jobs:
password: ${{ secrets.GH_PACKAGES_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ format('refs/pull/{0}/merge', github.event.pull_request.number) }}
persist-credentials: false
Expand All @@ -110,12 +110,12 @@ jobs:
printf '[diff "font"]\n\tbinary = true\n\ttextconv = ttx -q -i -o -' >> ~/.gitconfig
git diff --exit-code

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: fonts
path: fonts
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: metrics
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/screenshotter.yml
Expand Up @@ -34,15 +34,15 @@ jobs:
BROWSERSTACK_ACCESS_KEY: ${{ matrix.browserstack && secrets.BROWSERSTACK_ACCESS_KEY }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.pull_request.number) || '' }}
persist-credentials: false # do not persist credentials

- name: Use Node.js 14
uses: actions/setup-node@v3
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '18'

- name: Restore cached dependencies # restore only to prevent cache poisoning
uses: ylemkimon/cache-restore@v2
Expand Down Expand Up @@ -82,12 +82,12 @@ jobs:
docker logs ${{ job.services.selenium.id }}
echo "::$TOKEN::"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: new-${{ matrix.browser }}
path: test/screenshotter/new
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: diff-${{ matrix.browser }}
Expand Down