Write build args and removes line breaks

This commit is contained in:
Daniel Roth 2026-02-05 15:38:48 +00:00
parent 2a88271a77
commit c837453aed

View file

@ -68,12 +68,8 @@ jobs:
run: |
IMAGE_URI="${{ steps.repo.outputs.ecr_repo_url }}:${GITHUB_SHA}"
BUILD_ARGS=""
if [ -n "${{ inputs.build_args }}" ]; then
while read -r line; do
BUILD_ARGS="$BUILD_ARGS --build-arg $line"
done <<< "${{ inputs.build_args }}"
fi
# Writes build args and removes line breaks
BUILD_ARGS=$(echo "${{ inputs.build_args }}" | xargs -n1 printf -- '--build-arg %s ')
docker build \
-f ${{ inputs.dockerfile_path }} \