feat: add --apply-env-vars-to-build flag to push (#734) - #1345
Open
MatousMarik wants to merge 1 commit into
Open
feat: add --apply-env-vars-to-build flag to push (#734)#1345MatousMarik wants to merge 1 commit into
MatousMarik wants to merge 1 commit into
Conversation
Allows env vars from actor.json to be applied to the Actor build process (Docker build args) without flipping the switch in Console. When the flag is omitted, the value stored on the platform is kept.
MatousMarik
force-pushed
the
feat/push-apply-env-vars-to-build-734
branch
from
August 24, 2026 14:39
f9e8ca3 to
9c96569
Compare
MatousMarik
marked this pull request as ready for review
August 24, 2026 14:55
MatousMarik
requested review from
DaveHanns,
l2ysho and
szaganek
as code owners
August 24, 2026 14:55
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 (the
applyEnvVarsToBuildtoggle half).What
--apply-env-vars-to-buildboolean flag onapify push— setsapplyEnvVarsToBuild: trueon the Actor version, so env vars fromactor.jsonare also available during the Docker build.docs/viapnpm run update-docs.Why
Env vars synced by
apify pushcurrently apply only at runtime; making them apply to the build requires flipping a switch in Console. That breaks CI and fresh pushes of Actors that need build-time secrets (e.g. a GitHub token as a Docker build arg).Tests
[api]test intest/api/commands/push.test.ts: push with the flag → version hasapplyEnvVarsToBuild: true; push again without it → value preserved. Full push API suite passes (13/13), plustest:local, lint, format, build.Follow-ups (separate PRs)
applyEnvVarsToBuildfield in.actor/actor.json(persistent per-repo, incl. explicitfalseto turn it off).--env KEY=VALUEpassing on push (the other half of Pass environment variables toapify pushand toggleapplyEnvVarsToBuild#734).No new dependencies; no install-size impact.