Remote cache hits between github actions envs and .env.local envs #9768
-
SummaryIn "build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env.local"],
"outputs": [".next/**", "!.next/cache/**"]
},in the same ] My env:
FOO:1
BAR:2
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Run build
run: pnpm run build # Calls turbo buildIf a user runs The local build output and the CI build output should be equivalent but there will never be a cache hit cause in CI Is there a way to address that setup? Thanks in advance! ExamplesScenario 1I have a turborepo with, for instance, a nextjs app and some packages. I have a
If a user locally runs a build with the same envs and pushes it to the remote cache, I would expect CI to get the build from the remote cache. Scenario 2Vercel runs preview deployments in every PR but, even if using the same env values, it will never hit user cached builds due to the same reason above (users run builds with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
We don't currently capture this in our model, but could. For context, how it works today, we take the whole content of a file input (the |
Beta Was this translation helpful? Give feedback.
We don't currently capture this in our model, but could.
For context, how it works today, we take the whole content of a file input (the
.env.local) as a value itself, but don't inspect the values inside. We don't read them as "something on the environment". It's just a file like any other, so the real environment variables are an entirely different hashing input.