Skip to content

Commit 5177592

Browse files
committed
fixup!
1 parent fa61657 commit 5177592

20 files changed

+149
-99
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ updates:
99
commit-message:
1010
prefix: meta
1111
cooldown:
12-
default-days: 3
12+
default-days: 7
1313
open-pull-requests-limit: 10
1414

1515
- package-ecosystem: npm
@@ -22,7 +22,7 @@ updates:
2222
commit-message:
2323
prefix: meta
2424
cooldown:
25-
default-days: 3
25+
default-days: 7
2626
groups:
2727
lint:
2828
patterns:

.github/workflows/auto-merge.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,22 @@ on:
55
- cron: '*/15 * * * *'
66
workflow_dispatch:
77

8-
permissions:
9-
pull-requests: write
10-
contents: write
8+
concurrency:
9+
group: ${{ github.workflow }}
10+
cancel-in-progress: false
11+
12+
permissions: {}
1113

1214
jobs:
1315
auto-merge:
16+
name: Auto-merge
1417
if: github.repository == 'nodejs/nodejs.org'
1518
runs-on: ubuntu-latest
19+
permissions:
20+
# Required to approve and merge pull requests
21+
pull-requests: write
22+
# Required to merge pull requests via merge queue
23+
contents: write
1624

1725
steps:
1826
- name: Harden Runner

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ permissions:
2525
contents: read
2626
actions: read
2727

28-
env:
29-
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--cache-dir
30-
TURBO_ARGS: --cache-dir=.turbo/cache
28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.ref }}
30+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3131

3232
jobs:
3333
build:
@@ -61,7 +61,7 @@ jobs:
6161

6262
- name: Build Next.js
6363
# We want a ISR build on CI to ensure that regular Next.js builds work as expected.
64-
run: node_modules/.bin/turbo build ${{ env.TURBO_ARGS }}
64+
run: node_modules/.bin/turbo build --cache-dir=.turbo/cache
6565
env:
6666
# We want to ensure we have enough RAM allocated to the Node.js process
6767
# this should be a last resort in case by any chances the build memory gets too high
@@ -78,7 +78,7 @@ jobs:
7878

7979
- name: Build Next.js (Static Export)
8080
# We want to generate a static build, as it is a requirement of our website.
81-
run: node_modules/.bin/turbo deploy ${{ env.TURBO_ARGS }}
81+
run: node_modules/.bin/turbo deploy --cache-dir=.turbo/cache
8282
env:
8383
# We want to ensure we have enough RAM allocated to the Node.js process
8484
# this should be a last resort in case by any chances the build memory gets too high

.github/workflows/bundle-compare.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ on:
88
permissions:
99
contents: read
1010
actions: read
11-
# To create the comment
12-
pull-requests: write
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.workflow_run.id }}
14+
cancel-in-progress: true
1315

1416
jobs:
1517
compare:
1618
name: Compare Bundle Stats
1719
runs-on: ubuntu-latest
20+
permissions:
21+
# Required to comment on pull requests
22+
pull-requests: write
1823
if: github.event.workflow_run.event == 'pull_request'
1924

2025
steps:
@@ -25,6 +30,8 @@ jobs:
2530

2631
- name: Git Checkout
2732
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
persist-credentials: false
2835

2936
- name: Download Stats (HEAD)
3037
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0

.github/workflows/chromatic.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ defaults:
2929
# This ensures that the working directory is the root of the repository
3030
working-directory: ./
3131

32+
concurrency:
33+
group: ${{ github.workflow }}-${{ github.ref }}
34+
cancel-in-progress: ${{ github.event_name != 'push' }}
35+
3236
permissions:
3337
contents: read
3438
actions: read

.github/workflows/create-release-post.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,21 @@ defaults:
1919
# This ensures that the working directory is the root of the repository
2020
working-directory: ./
2121

22-
permissions:
23-
contents: write
24-
pull-requests: write
22+
permissions: {}
23+
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ inputs.version }}
26+
cancel-in-progress: false
2527

2628
jobs:
2729
create-post:
30+
name: Create Release Blog Post
2831
runs-on: ubuntu-latest
32+
permissions:
33+
# Required to push the release branch
34+
contents: write
35+
# Required to create the pull request
36+
pull-requests: write
2937

3038
steps:
3139
- uses: nodejs/web-team/actions/setup-environment@9f3c83af227d721768d9dbb63009a47ed4f4282f

.github/workflows/lighthouse.yml

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,57 +23,43 @@ defaults:
2323
permissions:
2424
contents: read
2525
actions: read
26-
# This permission is required by `thollander/actions-comment-pull-request`
27-
pull-requests: write
26+
27+
concurrency:
28+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
29+
cancel-in-progress: true
2830

2931
jobs:
30-
get-vercel-preview:
32+
lighthouse-ci:
3133
# We want to skip our lighthouse analysis on Dependabot PRs
3234
if: |
3335
startsWith(github.event.pull_request.head.ref, 'dependabot/') == false &&
3436
github.event.label.name == 'github_actions:pull-request'
35-
name: Get Vercel Preview
36-
runs-on: ubuntu-latest
37-
outputs:
38-
deployment_found: ${{ steps.set_outputs.outputs.deployment_found }}
39-
url: ${{ steps.set_outputs.outputs.url }}
40-
steps:
41-
- name: Capture Vercel Preview
42-
id: check_deployment
43-
uses: patrickedqvist/wait-for-vercel-preview@d7982701e6fcd3ae073bff929e408e004404d38d # v1.3.3
44-
with:
45-
token: ${{ secrets.GITHUB_TOKEN }}
46-
max_timeout: 300 # timeout after 5 minutes
47-
check_interval: 10 # check every 10 seconds
48-
continue-on-error: true
49-
- name: Set Outputs
50-
if: always()
51-
id: set_outputs
52-
run: |
53-
if [[ -z "${{ steps.check_deployment.outputs.url }}" ]]; then
54-
echo "deployment_found=false" >> $GITHUB_OUTPUT
55-
else
56-
echo "deployment_found=true" >> $GITHUB_OUTPUT
57-
echo "url=${{ steps.check_deployment.outputs.url }}" >> $GITHUB_OUTPUT
58-
fi
59-
60-
lighthouse-ci:
61-
needs: get-vercel-preview
62-
if: needs.get-vercel-preview.outputs.deployment_found == 'true'
6337
name: Lighthouse Report
6438
runs-on: ubuntu-latest
39+
permissions:
40+
# Required by `thollander/actions-comment-pull-request`
41+
pull-requests: write
6542

6643
steps:
6744
- name: Harden Runner
6845
uses: step-security/harden-runner@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
6946
with:
7047
egress-policy: audit
7148

49+
- name: Capture Vercel Preview
50+
id: deployment
51+
uses: patrickedqvist/wait-for-vercel-preview@d7982701e6fcd3ae073bff929e408e004404d38d # v1.3.3
52+
with:
53+
token: ${{ secrets.GITHUB_TOKEN }}
54+
max_timeout: 300 # timeout after 5 minutes
55+
check_interval: 10 # check every 10 seconds
56+
7257
- name: Git Checkout
7358
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7459
with:
7560
# Provides the Pull Request commit SHA or the GitHub merge group ref
7661
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
62+
persist-credentials: false
7763

7864
- name: Add Comment to PR
7965
# Signal that a lighthouse run is about to start
@@ -93,12 +79,12 @@ jobs:
9379
configPath: './.lighthouserc.json'
9480
# These URLS capture critical pages / site functionality.
9581
urls: |
96-
${{ needs.get-vercel-preview.outputs.url }}/en
97-
${{ needs.get-vercel-preview.outputs.url }}/en/about
98-
${{ needs.get-vercel-preview.outputs.url }}/en/about/previous-releases
99-
${{ needs.get-vercel-preview.outputs.url }}/en/download
100-
${{ needs.get-vercel-preview.outputs.url }}/en/download/archive/current
101-
${{ needs.get-vercel-preview.outputs.url }}/en/blog
82+
${{ steps.deployment.outputs.url }}/en
83+
${{ steps.deployment.outputs.url }}/en/about
84+
${{ steps.deployment.outputs.url }}/en/about/previous-releases
85+
${{ steps.deployment.outputs.url }}/en/download
86+
${{ steps.deployment.outputs.url }}/en/download/archive/current
87+
${{ steps.deployment.outputs.url }}/en/blog
10288
uploadArtifacts: true # save results as a action artifacts
10389
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
10490

@@ -111,7 +97,7 @@ jobs:
11197
# see https://github.com/actions/github-script#use-env-as-input
11298
LIGHTHOUSE_RESULT: ${{ steps.lighthouse_audit.outputs.manifest }}
11399
LIGHTHOUSE_LINKS: ${{ steps.lighthouse_audit.outputs.links }}
114-
VERCEL_PREVIEW_URL: ${{ needs.get-vercel-preview.outputs.url }}
100+
VERCEL_PREVIEW_URL: ${{ steps.deployment.outputs.url }}
115101
with:
116102
# Run as a separate file so we do not have to inline all of our formatting logic.
117103
# See https://github.com/actions/github-script#run-a-separate-file for more info.

.github/workflows/lint-and-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ permissions:
3333
contents: read
3434
actions: read
3535

36-
env:
37-
# See https://turbo.build/repo/docs/reference/command-line-reference/run#--cache-dir
38-
TURBO_ARGS: --cache-dir=.turbo/cache
36+
concurrency:
37+
group: ${{ github.workflow }}-${{ github.ref }}
38+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3939

4040
jobs:
4141
lint:
@@ -73,7 +73,7 @@ jobs:
7373
if: |
7474
(github.event_name == 'push' || github.event_name == 'merge_group') ||
7575
(github.event_name == 'pull_request' && github.event.pull_request.head.ref != 'chore/crowdin')
76-
run: node_modules/.bin/turbo lint lint:types prettier ${{ env.TURBO_ARGS }}
76+
run: node_modules/.bin/turbo lint lint:types prettier --cache-dir=.turbo/cache
7777

7878
- name: Save Lint Cache
7979
# We only want to save caches on `push` events or `pull_request_target` events
@@ -108,7 +108,7 @@ jobs:
108108
- name: Run Unit Tests
109109
# We want to run Unit Tests in every circumstance, including Crowdin PRs and Dependabot PRs to ensure
110110
# that changes to dependencies or translations don't break the Unit Tests
111-
run: node --run test:ci -- ${{ env.TURBO_ARGS }}
111+
run: node --run test:ci -- --cache-dir=.turbo/cache
112112

113113
- name: Upload test coverage to Codecov
114114
if: ${{ !cancelled() && github.event_name != 'merge_group' }}

.github/workflows/notify-on-push.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ name: Notify on Push
77
permissions:
88
contents: read
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.sha }}
12+
cancel-in-progress: false
13+
1014
jobs:
1115
notify_on_push:
1216
name: Notify on any direct push to `main`

.github/workflows/playwright.yml

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,7 @@ permissions:
2121
actions: read
2222

2323
jobs:
24-
get-vercel-preview:
25-
name: Get Vercel Preview
26-
runs-on: ubuntu-latest
27-
outputs:
28-
deployment_found: ${{ steps.set_outputs.outputs.deployment_found }}
29-
url: ${{ steps.set_outputs.outputs.url }}
30-
steps:
31-
- name: Capture Vercel Preview
32-
id: check_deployment
33-
uses: patrickedqvist/wait-for-vercel-preview@d7982701e6fcd3ae073bff929e408e004404d38d # v1.3.3
34-
with:
35-
token: ${{ secrets.GITHUB_TOKEN }}
36-
max_timeout: 300 # timeout after 5 minutes
37-
check_interval: 10 # check every 10 seconds
38-
continue-on-error: true
39-
- name: Set Outputs
40-
if: always()
41-
id: set_outputs
42-
run: |
43-
if [[ -z "${{ steps.check_deployment.outputs.url }}" ]]; then
44-
echo "deployment_found=false" >> $GITHUB_OUTPUT
45-
else
46-
echo "deployment_found=true" >> $GITHUB_OUTPUT
47-
echo "url=${{ steps.check_deployment.outputs.url }}" >> $GITHUB_OUTPUT
48-
fi
49-
5024
playwright:
51-
needs: get-vercel-preview
52-
if: needs.get-vercel-preview.outputs.deployment_found == 'true'
5325
name: Playwright Tests
5426
runs-on: ubuntu-latest
5527

@@ -60,6 +32,14 @@ jobs:
6032
use-version-file: true
6133
fetch-depth: 2
6234

35+
- name: Capture Vercel Preview
36+
id: deployment
37+
uses: patrickedqvist/wait-for-vercel-preview@d7982701e6fcd3ae073bff929e408e004404d38d # v1.3.3
38+
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
max_timeout: 300 # timeout after 5 minutes
41+
check_interval: 10 # check every 10 seconds
42+
6343
- name: Get Playwright version
6444
id: playwright-version
6545
working-directory: apps/site
@@ -80,7 +60,7 @@ jobs:
8060
working-directory: apps/site
8161
run: node --run playwright
8262
env:
83-
PLAYWRIGHT_BASE_URL: ${{ needs.get-vercel-preview.outputs.url }}
63+
PLAYWRIGHT_BASE_URL: ${{ steps.deployment.outputs.url }}
8464

8565
- name: Upload Playwright test results
8666
if: always()

0 commit comments

Comments
 (0)