Update turbo env handling (#53970)
This ensures env variables are passed through as expected when building the next-swc binaries, also removes an extra GH actions that isn't really needed as it's just a wrapper around `docker run`. Validated changes against run here https://github.com/vercel/next.js/actions/runs/5851719808/job/15862899331
This commit is contained in:
parent
9a6ae144a9
commit
6b6f0a2dd1
1 changed files with 3 additions and 29 deletions
32
.github/workflows/build_and_deploy.yml
vendored
32
.github/workflows/build_and_deploy.yml
vendored
|
@ -11,6 +11,8 @@ env:
|
|||
NODE_MAINTENANCE_VERSION: 16
|
||||
NODE_LTS_VERSION: 18.16.1
|
||||
CARGO_PROFILE_RELEASE_LTO: 'true'
|
||||
TURBO_TEAM: 'vercel'
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -20,7 +22,6 @@ 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
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
outputs:
|
||||
isRelease: ${{ github.event_name != 'workflow_dispatch' && steps.check-release.outputs.IS_RELEASE }}
|
||||
steps:
|
||||
|
@ -223,10 +224,6 @@ jobs:
|
|||
|
||||
name: stable - ${{ matrix.settings.target }} - node@16
|
||||
runs-on: ${{ matrix.settings.host }}
|
||||
env:
|
||||
TURBO_TEAM: 'vercel'
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
steps:
|
||||
# https://github.com/actions/virtual-environments/issues/1187
|
||||
- name: tune linux network
|
||||
|
@ -266,27 +263,8 @@ jobs:
|
|||
if: ${{ matrix.settings.setup }}
|
||||
|
||||
- name: Build in docker
|
||||
uses: addnab/docker-run-action@v3
|
||||
if: ${{ matrix.settings.docker }}
|
||||
with:
|
||||
image: ${{ matrix.settings.docker }}
|
||||
options: >-
|
||||
-e RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
|
||||
-e CARGO_INCREMENTAL=${{ env.CARGO_INCREMENTAL }}
|
||||
-e CARGO_PROFILE_RELEASE_LTO=${{ env.CARGO_PROFILE_RELEASE_LTO }}
|
||||
-e CARGO_TERM_COLOR=${{ env.CARGO_TERM_COLOR }}
|
||||
-e RUST_BACKTRACE=${{ env.RUST_BACKTRACE }}
|
||||
-e CARGO_REGISTRIES_CRATES_IO_PROTOCOL=${{ env.CARGO_REGISTRIES_CRATES_IO_PROTOCOL }}
|
||||
-e NAPI_CLI_VERSION=${{ env.NAPI_CLI_VERSION }}
|
||||
-e TURBO_VERSION=${{ env.TURBO_VERSION }}
|
||||
-e TURBO_TEAM=vercel
|
||||
-e TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
|
||||
-e TURBO_REMOTE_ONLY=true
|
||||
-v ${{ env.HOME }}/.cargo/git:/root/.cargo/git
|
||||
-v ${{ env.HOME }}/.cargo/registry:/root/.cargo/registry
|
||||
-v ${{ github.workspace }}:/build
|
||||
-w /build
|
||||
run: ${{ matrix.settings.build }}
|
||||
run: docker run -v "/var/run/docker.sock":"/var/run/docker.sock" -e RUST_TOOLCHAIN -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_REMOTE_ONLY -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 }}"
|
||||
|
||||
- name: 'Build'
|
||||
run: ${{ matrix.settings.build }}
|
||||
|
@ -344,10 +322,6 @@ jobs:
|
|||
- 'x64'
|
||||
- 'metal'
|
||||
|
||||
env:
|
||||
TURBO_TEAM: 'vercel'
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_REMOTE_ONLY: 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
|
Loading…
Reference in a new issue