Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
ddd94f0a
Unverified
Commit
ddd94f0a
authored
Aug 20, 2026
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Aug 20, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[15.5.x] Authenticate Turborepo remote caching with OIDC instead of a static PAT (#97604)
parent
1da7a0a0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
242 additions
and
38 deletions
+242
-38
action.yml
.github/actions/sccache/action.yml
+0
-4
start.sh
.github/actions/sccache/start.sh
+9
-14
build_and_deploy.yml
.github/workflows/build_and_deploy.yml
+31
-2
build_and_test.yml
.github/workflows/build_and_test.yml
+114
-0
build_reusable.yml
.github/workflows/build_reusable.yml
+8
-4
integration_tests_reusable.yml
.github/workflows/integration_tests_reusable.yml
+12
-0
pull_request_stats.yml
.github/workflows/pull_request_stats.yml
+14
-2
rspack-nextjs-build-integration-tests.yml
.github/workflows/rspack-nextjs-build-integration-tests.yml
+3
-0
rspack-nextjs-dev-integration-tests.yml
.github/workflows/rspack-nextjs-dev-integration-tests.yml
+3
-0
test-turbopack-rust-bench-test.yml
.github/workflows/test-turbopack-rust-bench-test.yml
+8
-4
test_e2e_deploy_release.yml
.github/workflows/test_e2e_deploy_release.yml
+3
-0
turbopack-benchmark.yml
.github/workflows/turbopack-benchmark.yml
+31
-8
turbopack-nextjs-build-integration-tests.yml
...ub/workflows/turbopack-nextjs-build-integration-tests.yml
+3
-0
turbopack-nextjs-dev-integration-tests.yml
.github/workflows/turbopack-nextjs-dev-integration-tests.yml
+3
-0
No files found.
.github/actions/sccache/action.yml
View file @
ddd94f0a
...
...
@@ -5,10 +5,6 @@ inputs:
description
:
'
SCCACHE_BASE_DIR
for
path
normalization
(default:
$GITHUB_WORKSPACE)'
required
:
false
default
:
'
'
turbo-token
:
description
:
'
Fallback
TURBO_TOKEN
if
not
set
in
environment
(e.g.
from
secrets.TURBO_TOKEN)'
required
:
false
default
:
'
'
runs
:
using
:
'
node20'
main
:
'
main.js'
...
...
.github/actions/sccache/start.sh
View file @
ddd94f0a
#!/usr/bin/env bash
set
-euo
pipefail
# Normalize TURBO_API and TURBO_TOKEN: prefer environment values and
# fall back to Vercel's public API and the secret passed as an action input.
# Default TURBO_API to Vercel's public API when the workflow does not set it.
if
[
-z
"
${
TURBO_API
:-}
"
]
;
then
export
TURBO_API
=
"https://api.vercel.com"
echo
"TURBO_API=
${
TURBO_API
}
"
>>
"
$GITHUB_ENV
"
fi
if
[
-z
"
${
TURBO_TOKEN
:-}
"
]
;
then
if
[
-n
"
${
INPUT_TURBO_TOKEN
:-}
"
]
;
then
export
TURBO_TOKEN
=
"
${
INPUT_TURBO_TOKEN
}
"
echo
"TURBO_TOKEN=
${
TURBO_TOKEN
}
"
>>
"
$GITHUB_ENV
"
else
echo
"WARNING: no TURBO_TOKEN available"
fi
fi
# Exported by `vercel/setup-turborepo-remote-cache-action`, and unset entirely
# when that step was skipped. Bind them so the substring expansions below don't
# trip `set -u`, which rejects an unset name even in `${var:0:3}`.
TURBO_TOKEN
=
"
${
TURBO_TOKEN
:-}
"
TURBO_TEAM
=
"
${
TURBO_TEAM
:-}
"
if
[
-z
"
${
TURBO_TEAM
:-}
"
]
;
then
export
TURBO_TEAM
=
"vtest314-next-adapter-e2e-tests"
echo
"TURBO_TEAM=
${
TURBO_TEAM
}
"
>>
"
$GITHUB_ENV
"
if
[
-z
"
$TURBO_TOKEN
"
]
;
then
echo
"WARNING: no TURBO_TOKEN available"
fi
echo
"::add-mask::
${
TURBO_TOKEN
:-
}
"
echo
"::add-mask::
${
TURBO_TOKEN
}
"
echo
"Cache endpoint:
${
TURBO_API
:0:9
}
..."
echo
"TURBO_TOKEN:
${
TURBO_TOKEN
:0:3
}
..."
echo
"TURBO_TEAM:
${
TURBO_TEAM
}
"
...
...
.github/workflows/build_and_deploy.yml
View file @
ddd94f0a
...
...
@@ -29,11 +29,10 @@ env:
TURBO_VERSION
:
2.5.5
NODE_LTS_VERSION
:
20
CARGO_PROFILE_RELEASE_LTO
:
'
true'
TURBO_TEAM
:
'
vtest314-next-adapter-e2e-tests'
TURBO_TEAM
:
${{ vars.TURBO_TEAM }}
# Prefer shared remote cache across runs, but keep local cache enabled so jobs
# degrade gracefully if the remote cache or token is unavailable.
TURBO_CACHE
:
'
local:rw,remote:rw'
TURBO_TOKEN
:
${{ secrets.TURBO_TOKEN }}
# Without this environment variable, rust-lld will fail because some dependencies defaults to newer version of macOS by default.
#
# See https://doc.rust-lang.org/rustc/platform-support/apple-darwin.html#os-version for more details
...
...
@@ -131,7 +130,17 @@ jobs:
# we build a dev binary for use in CI so skip downloading
# canary next-swc binaries in the monorepo
NEXT_SKIP_NATIVE_POSTINSTALL
:
1
permissions
:
contents
:
read
id-token
:
write
steps
:
-
name
:
Set up Turborepo remote cache
if
:
${{ vars.TURBO_TEAM != '' }}
continue-on-error
:
true
uses
:
vercel/setup-turborepo-remote-cache-action@135046f5efcadb17337d9b29b8d5b4035ae64b10
# v1.0.0
with
:
team
:
${{ vars.TURBO_TEAM }}
-
name
:
Setup node
uses
:
actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
# v6.4.0
with
:
...
...
@@ -340,7 +349,17 @@ jobs:
env
:
# Disable all build caches for production/staging/force-preview deploys
NEXT_SKIP_BUILD_CACHE
:
${{ contains(fromJSON('["production","staging","force-preview"]'), needs.deploy-target.outputs.value) && '1' || '' }}
permissions
:
contents
:
read
id-token
:
write
steps
:
-
name
:
Set up Turborepo remote cache
if
:
${{ vars.TURBO_TEAM != '' }}
continue-on-error
:
true
uses
:
vercel/setup-turborepo-remote-cache-action@135046f5efcadb17337d9b29b8d5b4035ae64b10
# v1.0.0
with
:
team
:
${{ vars.TURBO_TEAM }}
# https://github.com/actions/virtual-environments/issues/1187
-
name
:
tune linux network
run
:
sudo ethtool -K eth0 tx off rx off
...
...
@@ -476,7 +495,17 @@ jobs:
runs-on
:
ubuntu-latest-16-core-oss
permissions
:
contents
:
read
id-token
:
write
steps
:
-
name
:
Set up Turborepo remote cache
if
:
${{ vars.TURBO_TEAM != '' }}
continue-on-error
:
true
uses
:
vercel/setup-turborepo-remote-cache-action@135046f5efcadb17337d9b29b8d5b4035ae64b10
# v1.0.0
with
:
team
:
${{ vars.TURBO_TEAM }}
-
uses
:
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
# v6.0.2
-
name
:
Setup node
...
...
.github/workflows/build_and_test.yml
View file @
ddd94f0a
This diff is collapsed.
Click to expand it.
.github/workflows/build_reusable.yml
View file @
ddd94f0a
...
...
@@ -85,11 +85,10 @@ env:
# disable backtrace for test snapshots
RUST_BACKTRACE
:
0
TURBO_TEAM
:
'
vtest314-next-adapter-e2e-tests'
TURBO_TEAM
:
${{ vars.TURBO_TEAM }}
# Prefer shared remote cache across runs, but keep local cache enabled so jobs
# degrade gracefully if the remote cache or token is unavailable.
TURBO_CACHE
:
'
local:rw,remote:rw'
TURBO_TOKEN
:
${{ secrets.TURBO_TOKEN }}
NEXT_TELEMETRY_DISABLED
:
1
# allow not skipping install-native postinstall script if we don't have a binary available already
...
...
@@ -120,6 +119,13 @@ jobs:
input_step_key
:
${{ steps.var.outputs.input_step_key }}
steps
:
-
name
:
Set up Turborepo remote cache
if
:
${{ vars.TURBO_TEAM != '' }}
continue-on-error
:
true
uses
:
vercel/setup-turborepo-remote-cache-action@135046f5efcadb17337d9b29b8d5b4035ae64b10
# v1.0.0
with
:
team
:
${{ vars.TURBO_TEAM }}
# enforce consistent line endings for git on windows
-
name
:
Configure git to use LF endings
if
:
${{ runner.os == 'Windows' }}
...
...
@@ -230,8 +236,6 @@ jobs:
-
name
:
Start sccache
uses
:
./.github/actions/sccache
if
:
${{ runner.os != 'Windows' && (inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes') }}
with
:
turbo-token
:
${{ secrets.TURBO_TOKEN }}
-
run
:
pnpm dlx turbo@${TURBO_VERSION} run build-native-${{ inputs.rustBuildProfile }} -v --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ inputs.buildNativeTarget }}
if
:
${{ inputs.skipNativeBuild != 'yes' }}
...
...
.github/workflows/integration_tests_reusable.yml
View file @
ddd94f0a
...
...
@@ -41,6 +41,9 @@ jobs:
# First, build Next.js to execute across tests.
build-next
:
name
:
build-next
permissions
:
contents
:
read
id-token
:
write
uses
:
./.github/workflows/build_reusable.yml
with
:
skipNativeBuild
:
yes
...
...
@@ -49,6 +52,9 @@ jobs:
build-native
:
name
:
build-native
permissions
:
contents
:
read
id-token
:
write
uses
:
./.github/workflows/build_reusable.yml
with
:
skipInstallBuild
:
yes
...
...
@@ -86,6 +92,9 @@ jobs:
fail-fast: false
matrix:
group: ${{ fromJSON(needs.generate-matrices.outputs.e2e) }}
permissions:
contents: read
id-token: write
uses: ./.github/workflows/build_reusable.yml
with:
afterBuild: |
...
...
@@ -117,6 +126,9 @@ jobs:
fail-fast: false
matrix:
group: ${{ fromJSON(needs.generate-matrices.outputs.integration) }}
permissions:
contents: read
id-token: write
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
...
...
.github/workflows/pull_request_stats.yml
View file @
ddd94f0a
...
...
@@ -10,11 +10,10 @@ env:
NODE_LTS_VERSION
:
20
TEST_CONCURRENCY
:
6
TURBO_TEAM
:
'
vtest314-next-adapter-e2e-tests'
TURBO_TEAM
:
${{ vars.TURBO_TEAM }}
# Prefer shared remote cache across runs, but keep local cache enabled so jobs
# degrade gracefully if the remote cache or token is unavailable.
TURBO_CACHE
:
'
local:rw,remote:rw'
TURBO_TOKEN
:
${{ secrets.TURBO_TOKEN }}
NEXT_TELEMETRY_DISABLED
:
1
# we build a dev binary for use in CI so skip downloading
# canary next-swc binaries in the monorepo
...
...
@@ -27,6 +26,9 @@ env:
jobs
:
build
:
permissions
:
contents
:
read
id-token
:
write
uses
:
./.github/workflows/build_reusable.yml
secrets
:
inherit
with
:
...
...
@@ -39,7 +41,17 @@ jobs:
needs
:
build
timeout-minutes
:
25
runs-on
:
ubuntu-latest-16-core-oss
permissions
:
contents
:
read
id-token
:
write
steps
:
-
name
:
Set up Turborepo remote cache
if
:
${{ vars.TURBO_TEAM != '' }}
continue-on-error
:
true
uses
:
vercel/setup-turborepo-remote-cache-action@135046f5efcadb17337d9b29b8d5b4035ae64b10
# v1.0.0
with
:
team
:
${{ vars.TURBO_TEAM }}
-
uses
:
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
# v6.0.2
with
:
fetch-depth
:
25
...
...
.github/workflows/rspack-nextjs-build-integration-tests.yml
View file @
ddd94f0a
...
...
@@ -9,6 +9,9 @@ on:
jobs
:
test-dev
:
name
:
Rspack integration tests
permissions
:
contents
:
read
id-token
:
write
uses
:
./.github/workflows/integration_tests_reusable.yml
with
:
name
:
rspack-production
...
...
.github/workflows/rspack-nextjs-dev-integration-tests.yml
View file @
ddd94f0a
...
...
@@ -9,6 +9,9 @@ on:
jobs
:
test-dev
:
name
:
Rspack integration tests
permissions
:
contents
:
read
id-token
:
write
uses
:
./.github/workflows/integration_tests_reusable.yml
with
:
name
:
rspack-development
...
...
.github/workflows/test-turbopack-rust-bench-test.yml
View file @
ddd94f0a
...
...
@@ -17,14 +17,20 @@ env:
TURBOPACK_BENCH_PROGRESS
:
'
1'
NODE_LTS_VERSION
:
20
TURBO_TEAM
:
'
vtest314-next-adapter-e2e-tests'
TURBO_TOKEN
:
${{ secrets.TURBO_TOKEN }}
TURBO_TEAM
:
${{ vars.TURBO_TEAM }}
jobs
:
test
:
name
:
Test
runs-on
:
${{ fromJSON(inputs.runner) }}
steps
:
-
name
:
Set up Turborepo remote cache
if
:
${{ vars.TURBO_TEAM != '' }}
continue-on-error
:
true
uses
:
vercel/setup-turborepo-remote-cache-action@135046f5efcadb17337d9b29b8d5b4035ae64b10
# v1.0.0
with
:
team
:
${{ vars.TURBO_TEAM }}
-
name
:
Set git to use LF
run
:
|
git config --global core.autocrlf false
...
...
@@ -51,8 +57,6 @@ jobs:
-
name
:
Start sccache
uses
:
./.github/actions/sccache
with
:
turbo-token
:
${{ secrets.TURBO_TOKEN }}
-
name
:
Build benchmarks for tests
timeout-minutes
:
120
...
...
.github/workflows/test_e2e_deploy_release.yml
View file @
ddd94f0a
...
...
@@ -93,6 +93,9 @@ jobs:
test-deploy
:
name
:
Run Deploy Tests
needs
:
setup
permissions
:
contents
:
read
id-token
:
write
uses
:
./.github/workflows/build_reusable.yml
secrets
:
inherit
strategy
:
...
...
.github/workflows/turbopack-benchmark.yml
View file @
ddd94f0a
...
...
@@ -22,17 +22,26 @@ env:
CARGO_INCREMENTAL
:
0
# For faster CI
RUST_LOG
:
'
off'
TURBO_TEAM
:
'
vtest314-next-adapter-e2e-tests'
TURBO_TEAM
:
${{ vars.TURBO_TEAM }}
# Prefer shared remote cache across runs, but keep local cache enabled so jobs
# degrade gracefully if the remote cache or token is unavailable.
TURBO_CACHE
:
'
local:rw,remote:rw'
TURBO_TOKEN
:
${{ secrets.TURBO_TOKEN }}
jobs
:
benchmark-tiny
:
name
:
Benchmark Rust Crates (tiny)
runs-on
:
ubuntu-latest
permissions
:
contents
:
read
id-token
:
write
steps
:
-
name
:
Set up Turborepo remote cache
if
:
${{ vars.TURBO_TEAM != '' }}
continue-on-error
:
true
uses
:
vercel/setup-turborepo-remote-cache-action@135046f5efcadb17337d9b29b8d5b4035ae64b10
# v1.0.0
with
:
team
:
${{ vars.TURBO_TEAM }}
-
uses
:
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
# v6.0.2
-
name
:
Setup Rust toolchain
...
...
@@ -45,8 +54,6 @@ jobs:
-
name
:
Start sccache
uses
:
./.github/actions/sccache
with
:
turbo-token
:
${{ secrets.TURBO_TOKEN }}
-
name
:
Build app build benchmarks
run
:
cargo codspeed build -p next-api
...
...
@@ -60,7 +67,17 @@ jobs:
benchmark-small-apps
:
name
:
Benchmark Rust Crates (small apps)
runs-on
:
ubuntu-latest-16-core-oss
permissions
:
contents
:
read
id-token
:
write
steps
:
-
name
:
Set up Turborepo remote cache
if
:
${{ vars.TURBO_TEAM != '' }}
continue-on-error
:
true
uses
:
vercel/setup-turborepo-remote-cache-action@135046f5efcadb17337d9b29b8d5b4035ae64b10
# v1.0.0
with
:
team
:
${{ vars.TURBO_TEAM }}
-
uses
:
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
# v6.0.2
-
name
:
Setup Rust toolchain
...
...
@@ -73,8 +90,6 @@ jobs:
-
name
:
Start sccache
uses
:
./.github/actions/sccache
with
:
turbo-token
:
${{ secrets.TURBO_TOKEN }}
-
name
:
Install pnpm dependencies
working-directory
:
turbopack/benchmark-apps
...
...
@@ -96,7 +111,17 @@ jobs:
name
:
Benchmark Rust Crates (large)
if
:
${{ github.event.label.name == 'benchmark' || github.event_name == 'workflow_dispatch' }}
runs-on
:
ubuntu-latest-16-core-oss
permissions
:
contents
:
read
id-token
:
write
steps
:
-
name
:
Set up Turborepo remote cache
if
:
${{ vars.TURBO_TEAM != '' }}
continue-on-error
:
true
uses
:
vercel/setup-turborepo-remote-cache-action@135046f5efcadb17337d9b29b8d5b4035ae64b10
# v1.0.0
with
:
team
:
${{ vars.TURBO_TEAM }}
-
uses
:
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
# v6.0.2
-
name
:
Setup Rust toolchain
...
...
@@ -109,8 +134,6 @@ jobs:
-
name
:
Start sccache
uses
:
./.github/actions/sccache
with
:
turbo-token
:
${{ secrets.TURBO_TOKEN }}
-
name
:
Build the benchmark target(s)
run
:
cargo codspeed build -p turbopack -p turbopack-bench
...
...
.github/workflows/turbopack-nextjs-build-integration-tests.yml
View file @
ddd94f0a
...
...
@@ -8,6 +8,9 @@ on:
jobs
:
test-dev
:
name
:
Next.js integration tests
permissions
:
contents
:
read
id-token
:
write
uses
:
./.github/workflows/integration_tests_reusable.yml
with
:
name
:
turbopack-production
...
...
.github/workflows/turbopack-nextjs-dev-integration-tests.yml
View file @
ddd94f0a
...
...
@@ -8,6 +8,9 @@ on:
jobs
:
test-dev
:
name
:
Next.js integration tests
permissions
:
contents
:
read
id-token
:
write
uses
:
./.github/workflows/integration_tests_reusable.yml
with
:
name
:
turbopack-development
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment