Skip to content

feat: read applyEnvVarsToBuild from actor.json in push (#734) - #1346

Open
MatousMarik wants to merge 1 commit into
feat/push-apply-env-vars-to-build-734from
feat/actor-json-apply-env-vars-to-build-734
Open

feat: read applyEnvVarsToBuild from actor.json in push (#734)#1346
MatousMarik wants to merge 1 commit into
feat/push-apply-env-vars-to-build-734from
feat/actor-json-apply-env-vars-to-build-734

Conversation

@MatousMarik

@MatousMarik MatousMarik commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Part of #734, stacked on #1345 (retarget to master once that merges — only the last commit is new here).

What

  • apify push now reads applyEnvVarsToBuild from .actor/actor.json, so the setting persists per repo and applies on every push (useful for CI and Actors needing build-time secrets).
  • Precedence: --[no-]apply-env-vars-to-build flag > applyEnvVarsToBuild in actor.json > omitted (value stored on the platform is kept). An explicit false in actor.json turns the setting off.
  • Documented in docs/vars.md; flag description updated (+ regenerated docs/reference.md).

Tests

  • New [api] test covering field true, field false, flag-over-field precedence, and the negated flag beating a true in the file (the case that pins ?? over ||). Full push API suite passes (14/14), plus test:local, lint, format, build.
  • Note for reviewers: useActorConfig caches by cwd, so the test resets the cache when rewriting actor.json mid-test.

Follow-up (separate PR)

No new dependencies; no install-size impact.

@MatousMarik
MatousMarik force-pushed the feat/push-apply-env-vars-to-build-734 branch from 9c96569 to 923d4a8 Compare August 25, 2026 07:42
@MatousMarik
MatousMarik force-pushed the feat/actor-json-apply-env-vars-to-build-734 branch from 556d4c0 to c53d79f Compare August 25, 2026 07:42
@MatousMarik
MatousMarik force-pushed the feat/actor-json-apply-env-vars-to-build-734 branch from c53d79f to 9cfb129 Compare August 25, 2026 08:08
The field persists the build env vars setting per repo, so it applies
on every push without remembering the flag. The
--apply-env-vars-to-build flag takes precedence over the field, and an
explicit false in actor.json turns the setting off. When both are
omitted, the value stored on the platform is kept.
@MatousMarik
MatousMarik force-pushed the feat/push-apply-env-vars-to-build-734 branch from 923d4a8 to 420860a Compare August 25, 2026 09:16
@MatousMarik
MatousMarik force-pushed the feat/actor-json-apply-env-vars-to-build-734 branch from 9cfb129 to a8a1158 Compare August 25, 2026 09:16
@MatousMarik
MatousMarik marked this pull request as ready for review August 25, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants