File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -60,33 +60,32 @@ jobs:
6060 IMAGE_FORMAT : ${{ steps.manifest.outputs.format }}
6161 run : |
6262 # Build args from manifest
63- BUILD_ARGS=""
64- for arg in $(yq e '.build.args[]' manifest.yaml) ; do
65- BUILD_ARGS="${BUILD_ARGS} --build-arg ${arg}"
66- done
63+ BUILD_ARGS=()
64+ while IFS= read -r arg ; do
65+ BUILD_ARGS+=( --build-arg " ${arg}")
66+ done < <(yq e '.build.args[]' manifest.yaml)
6767
6868 # Labels from manifest
69- LABELS=""
69+ LABELS=()
7070 while IFS= read -r label; do
7171 if [[ -n "${label}" ]]; then
7272 label_key="${label%%=*}"
7373 label_value="${label#*=}"
7474 label_value="${label_value%\"}"
7575 label_value="${label_value#\"}"
76- LABELS="${LABELS} --label ${label_key}=${label_value}"
76+ LABELS+=( --label " ${label_key}=${label_value}")
7777 fi
7878 done < <(yq e '.build.labels[]' manifest.yaml)
7979
8080 # Add version label
81- LABELS="${LABELS} --label org.opencontainers.image.version=${IMAGE_VERSION}"
81+ LABELS+=( --label " org.opencontainers.image.version=${IMAGE_VERSION}")
8282
83- # shellcheck disable=SC2086
8483 buildah build \
8584 --squash \
8685 --pull-always \
8786 --format "${IMAGE_FORMAT}" \
88- ${BUILD_ARGS} \
89- ${LABELS} \
87+ " ${BUILD_ARGS[@]}" \
88+ " ${LABELS[@]}" \
9089 --tag "${IMAGE_NAME}:${IMAGE_VERSION}" \
9190 .
9291
You can’t perform that action at this time.
0 commit comments