Skip to content

Commit c6c2972

Browse files
committed
only CI
1 parent 10de327 commit c6c2972

4 files changed

Lines changed: 7 additions & 11 deletions

File tree

build-static.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ else
205205
# shellcheck disable=SC2086
206206
${spcCommand} build --enable-zts --build-embed ${SPC_OPT_BUILD_ARGS} "${PHP_EXTENSIONS}" --with-libs="${PHP_EXTENSION_LIBS}"
207207

208-
if [ -n "$GITHUB_ACTIONS" ] || [ -n "$CI" ]; then
208+
if [ -n "$CI" ]; then
209+
rm -rf ./downloads
209210
rm -rf ./source
210211
fi
211212

docker-bake.hcl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ target "static-builder-musl" {
142142
args = {
143143
FRANKENPHP_VERSION = VERSION
144144
# pass CI flags from the environment so Dockerfiles can propagate them
145-
CI = CI
146-
GITHUB_ACTIONS = GITHUB_ACTIONS
145+
CI = env("CI")
147146
}
148147
secret = ["id=github-token,env=GITHUB_TOKEN"]
149148
}
@@ -169,8 +168,9 @@ target "static-builder-gnu" {
169168
FRANKENPHP_VERSION = VERSION
170169
GO_VERSION = GO_VERSION
171170
# pass CI flags from the environment so Dockerfiles can propagate them
172-
CI = CI
173-
GITHUB_ACTIONS = GITHUB_ACTIONS
171+
# use env() to read from the shell environment running bake
172+
CI = env("CI")
173+
GITHUB_ACTIONS = env("GITHUB_ACTIONS")
174174
}
175175
secret = ["id=github-token,env=GITHUB_TOKEN"]
176176
}

static-builder-gnu.Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ ENV GOTOOLCHAIN=local
2929

3030
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
3131

32-
# Pass through CI environment flags so build-static.sh can detect CI context
32+
# Pass through CI environment flag so build-static.sh can detect CI context
3333
ARG CI
34-
ARG GITHUB_ACTIONS
3534
ENV CI=${CI}
36-
ENV GITHUB_ACTIONS=${GITHUB_ACTIONS}
3735

3836
# labels, same as static-builder.Dockerfile
3937

static-builder-musl.Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,8 @@ ENV GOTOOLCHAIN=local
2525

2626
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
2727

28-
# Pass through CI environment flags so build-static.sh can detect CI context
2928
ARG CI
30-
ARG GITHUB_ACTIONS
3129
ENV CI=${CI}
32-
ENV GITHUB_ACTIONS=${GITHUB_ACTIONS}
3330

3431
LABEL org.opencontainers.image.title=FrankenPHP
3532
LABEL org.opencontainers.image.description="The modern PHP app server"

0 commit comments

Comments
 (0)