feat: read applyEnvVarsToBuild from actor.json in push (#734) - #1346
Open
MatousMarik wants to merge 4 commits into
Open
feat: read applyEnvVarsToBuild from actor.json in push (#734)#1346MatousMarik wants to merge 4 commits into
MatousMarik wants to merge 4 commits into
Conversation
MatousMarik
force-pushed
the
feat/push-apply-env-vars-to-build-734
branch
from
August 25, 2026 07:42
9c96569 to
923d4a8
Compare
MatousMarik
force-pushed
the
feat/actor-json-apply-env-vars-to-build-734
branch
from
August 25, 2026 07:42
556d4c0 to
c53d79f
Compare
MatousMarik
force-pushed
the
feat/actor-json-apply-env-vars-to-build-734
branch
from
August 25, 2026 08:08
c53d79f to
9cfb129
Compare
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
force-pushed
the
feat/push-apply-env-vars-to-build-734
branch
from
August 25, 2026 09:16
923d4a8 to
420860a
Compare
MatousMarik
force-pushed
the
feat/actor-json-apply-env-vars-to-build-734
branch
from
August 25, 2026 09:16
9cfb129 to
a8a1158
Compare
MatousMarik
marked this pull request as ready for review
August 25, 2026 13:23
MatousMarik
requested review from
DaveHanns,
l2ysho and
szaganek
as code owners
August 25, 2026 13:23
szaganek
reviewed
Aug 26, 2026
szaganek
left a comment
Contributor
There was a problem hiding this comment.
Three suggestions from me to improve readability.
| 'apply-env-vars-to-build': Flags.boolean({ | ||
| description: | ||
| 'Make the environment variables also available to the Actor build process. Use --no-apply-env-vars-to-build to turn the setting off. When omitted, the setting currently stored on the platform is kept.', | ||
| description: `Make the environment variables also available to the Actor build process. Use --no-apply-env-vars-to-build to turn the setting off. Overrides the 'applyEnvVarsToBuild' field in the '${LOCAL_CONFIG_PATH}' file. When both are omitted, the setting currently stored on the platform is kept.`, |
Contributor
There was a problem hiding this comment.
Suggested change
| description: `Make the environment variables also available to the Actor build process. Use --no-apply-env-vars-to-build to turn the setting off. Overrides the 'applyEnvVarsToBuild' field in the '${LOCAL_CONFIG_PATH}' file. When both are omitted, the setting currently stored on the platform is kept.`, | |
| description: `Make the environment variables also available to the Actor build process. To turn the setting off, use --no-apply-env-vars-to-build. Overrides the value of the 'applyEnvVarsToBuild' field in the '${LOCAL_CONFIG_PATH}' file. Without a flag, the setting currently stored on the platform is kept.`, |
Contributor
There was a problem hiding this comment.
[claude] -> original version seems to be better, platform is kept when both are omitted, not just flag.
Contributor
There was a problem hiding this comment.
Ah. Let's make it explicit then:
When both the field and the flag are omitted, the setting currently stored on the platform is kept.
Co-authored-by: Edyta <142720610+szaganek@users.noreply.github.com>
Co-authored-by: Edyta <142720610+szaganek@users.noreply.github.com>
Co-authored-by: Edyta <142720610+szaganek@users.noreply.github.com>
l2ysho
approved these changes
Sep 2, 2026
l2ysho
left a comment
Contributor
There was a problem hiding this comment.
thx @MatousMarik
pre-aprooving as nothing blocking here but I think pnpm run update-docs should be made, also I left one comment in docs thread where It looks like original version was more inline with code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #734, stacked on #1345 (retarget to
masteronce that merges — only the last commit is new here).What
apify pushnow readsapplyEnvVarsToBuildfrom.actor/actor.json, so the setting persists per repo and applies on every push (useful for CI and Actors needing build-time secrets).--[no-]apply-env-vars-to-buildflag >applyEnvVarsToBuildin actor.json > omitted (value stored on the platform is kept). An explicitfalsein actor.json turns the setting off.docs/vars.md; flag description updated (+ regenerateddocs/reference.md).Tests
[api]test covering fieldtrue, fieldfalse, flag-over-field precedence, and the negated flag beating atruein the file (the case that pins??over||). Full push API suite passes (14/14), plustest:local, lint, format, build.useActorConfigcaches by cwd, so the test resets the cache when rewriting actor.json mid-test.Follow-up (separate PR)
--env KEY=VALUEpassing on push (the other half of Pass environment variables toapify pushand toggleapplyEnvVarsToBuild#734).No new dependencies; no install-size impact.