Skip to content

Commit 0e5f9e9

Browse files
committed
Tighten Docker build action arguments
1 parent 50e04fe commit 0e5f9e9

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/actions/cpflow-build-docker-image/action.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inputs:
1515
description: Pull request number for status messaging
1616
required: false
1717
docker_build_extra_args:
18-
description: Optional newline-delimited extra arguments passed through to docker build
18+
description: Optional newline-delimited extra docker build tokens. Use key=value forms like --build-arg=FOO=bar.
1919
required: false
2020
docker_build_ssh_key:
2121
description: Optional private SSH key used for Docker builds that fetch private dependencies with RUN --mount=type=ssh
@@ -49,6 +49,13 @@ runs:
4949
while IFS= read -r arg; do
5050
arg="${arg%$'\r'}"
5151
[[ -n "${arg}" ]] || continue
52+
53+
if [[ "${arg}" =~ [[:space:]] ]]; then
54+
echo "docker_build_extra_args entries must be single docker-build tokens. " \
55+
"Use key=value forms like --build-arg=FOO=bar." >&2
56+
exit 1
57+
fi
58+
5259
docker_build_args+=("${arg}")
5360
done <<< "${{ inputs.docker_build_extra_args }}"
5461
fi
@@ -74,7 +81,7 @@ EOF
7481
eval "$(ssh-agent -s)"
7582
trap 'ssh-agent -k >/dev/null' EXIT
7683
ssh-add - <<< "${{ inputs.docker_build_ssh_key }}"
77-
docker_build_args+=("--ssh" "default")
84+
docker_build_args+=("--ssh=default")
7885
fi
7986

8087
echo "🏗️ Building Docker image${PR_INFO} (commit ${{ inputs.commit }})..."

.github/actions/cpflow-setup-environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ inputs:
1919
cpflow_version:
2020
description: cpflow gem version
2121
required: false
22-
default: "__CPFLOW_VERSION__"
22+
default: "4.2.0"
2323

2424
runs:
2525
using: composite

0 commit comments

Comments
 (0)