Skip to content

Commit 8be46b6

Browse files
authored
fix(CI build_and_deploy): Pass CI environment variable through for docker builds (#77308)
We use the `CI` environment variable to override turbopack's "dirty" state: https://github.com/vercel/next.js/blob/ed10f7ed0246fcc763194197eb9beebcbd063162/crates/napi/src/next_api/utils.rs#L138-L139 More discussion here: 🧵 https://vercel.slack.com/archives/C03EWR7LGEN/p1742223536560419?thread_ts=1742223415.894359&cid=C03EWR7LGEN Here's a `build_and_deploy` CI job running on this branch: https://github.com/vercel/next.js/actions/runs/13961735504/job/39084197470
1 parent 3e1df5d commit 8be46b6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: .github/workflows/build_and_deploy.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,17 @@ jobs:
351351

352352
- name: Build in docker
353353
if: ${{ matrix.settings.docker && steps.build-exists.outputs.BUILD_EXISTS == 'no' }}
354-
run: docker run -v "/var/run/docker.sock":"/var/run/docker.sock" -e RUST_BACKTRACE -e NAPI_CLI_VERSION -e CARGO_TERM_COLOR -e CARGO_INCREMENTAL -e CARGO_PROFILE_RELEASE_LTO -e CARGO_REGISTRIES_CRATES_IO_PROTOCOL -e TURBO_API -e TURBO_TEAM -e TURBO_TOKEN -e TURBO_VERSION -e TURBO_CACHE="remote:rw" -v ${{ env.HOME }}/.cargo/git:/root/.cargo/git -v ${{ env.HOME }}/.cargo/registry:/root/.cargo/registry -v ${{ github.workspace }}:/build -w /build --entrypoint=bash ${{ matrix.settings.docker }} -c "${{ matrix.settings.build }}"
354+
run: |
355+
docker run -v "/var/run/docker.sock":"/var/run/docker.sock" \
356+
-e CI -e RUST_BACKTRACE -e NAPI_CLI_VERSION -e CARGO_TERM_COLOR -e CARGO_INCREMENTAL \
357+
-e CARGO_PROFILE_RELEASE_LTO -e CARGO_REGISTRIES_CRATES_IO_PROTOCOL -e TURBO_API \
358+
-e TURBO_TEAM -e TURBO_TOKEN -e TURBO_VERSION -e TURBO_CACHE="remote:rw" \
359+
-v ${{ env.HOME }}/.cargo/git:/root/.cargo/git \
360+
-v ${{ env.HOME }}/.cargo/registry:/root/.cargo/registry \
361+
-v ${{ github.workspace }}:/build \
362+
-w /build \
363+
--entrypoint=bash ${{ matrix.settings.docker }} \
364+
-c "${{ matrix.settings.build }}"
355365
356366
- name: cache build
357367
if: ${{ matrix.settings.docker && steps.build-exists.outputs.BUILD_EXISTS == 'no' }}

0 commit comments

Comments
 (0)