Skip to content

Commit

Permalink
chore: upgrade actions/checkout action (#3947)
Browse files Browse the repository at this point in the history
* chore: upgrade actions/checkout action

Removes warning about Node 16 from every CI job

* Pull yarn deps install outside docker

* corepack enable in docker
  • Loading branch information
edemaine committed May 10, 2024
1 parent 93e2655 commit 578cea2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

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

Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
needs: test

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
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
4 changes: 2 additions & 2 deletions .github/workflows/fonts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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
Expand Down Expand Up @@ -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 Down
10 changes: 7 additions & 3 deletions .github/workflows/screenshotter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ 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
Expand All @@ -49,6 +49,11 @@ jobs:
node-version: '20'
cache: yarn

- name: Install dependencies
run: yarn --immutable
env:
YARN_ENABLE_SCRIPTS: 0 # disable postinstall scripts

- name: Run screenshotter
run: |
TOKEN="$(cat /proc/sys/kernel/random/uuid | sha256sum | head -c 64)"
Expand All @@ -63,10 +68,9 @@ jobs:
-v "$PWD:/code" \
-v "$PWD/.git:/code/.git:ro" \
-w /code \
-e YARN_ENABLE_SCRIPTS=0 \
-e CI=true \
node:20 \
/bin/bash -c 'yarn --immutable && yarn node dockers/screenshotter/screenshotter.js -b ${{ matrix.browser }} --verify --diff --new --katex-ip $HOSTNAME ${{ matrix.browserstack && format('--selenium-proxy http://selenium:4445/build --browserstack --selenium-capabilities ''\''''{0}''\', toJson(matrix.browserstack)) || '--selenium-ip selenium' }}'
/bin/bash -c 'corepack enable && yarn node dockers/screenshotter/screenshotter.js -b ${{ matrix.browser }} --verify --diff --new --katex-ip $HOSTNAME ${{ matrix.browserstack && format('--selenium-proxy http://selenium:4445/build --browserstack --selenium-capabilities ''\''''{0}''\', toJson(matrix.browserstack)) || '--selenium-ip selenium' }}'
echo "::$TOKEN::"
timeout-minutes: 10

Expand Down

0 comments on commit 578cea2

Please sign in to comment.