Skip to content

Commit 7177380

Browse files
committed
add as variable
1 parent c6c2972 commit 7177380

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

docker-bake.hcl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ variable "CACHE" {
2424
default = ""
2525
}
2626

27+
variable "CI" {
28+
# CI flag coming from the environment or --set; empty by default
29+
default = ""
30+
}
31+
2732
variable DEFAULT_PHP_VERSION {
2833
default = "8.4"
2934
}
@@ -141,8 +146,7 @@ target "static-builder-musl" {
141146
}
142147
args = {
143148
FRANKENPHP_VERSION = VERSION
144-
# pass CI flags from the environment so Dockerfiles can propagate them
145-
CI = env("CI")
149+
CI = CI
146150
}
147151
secret = ["id=github-token,env=GITHUB_TOKEN"]
148152
}
@@ -167,10 +171,9 @@ target "static-builder-gnu" {
167171
args = {
168172
FRANKENPHP_VERSION = VERSION
169173
GO_VERSION = GO_VERSION
170-
# pass CI flags from the environment so Dockerfiles can propagate them
171-
# use env() to read from the shell environment running bake
172-
CI = env("CI")
173-
GITHUB_ACTIONS = env("GITHUB_ACTIONS")
174+
# pass CI flags so Dockerfiles can propagate them
175+
CI = CI
176+
GITHUB_ACTIONS = GITHUB_ACTIONS
174177
}
175178
secret = ["id=github-token,env=GITHUB_TOKEN"]
176179
}

0 commit comments

Comments
 (0)