Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/build-node-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,18 @@ jobs:
BOOTC_DIGEST=$(cat /tmp/bootc-digest)
echo "digest=${BOOTC_DIGEST}" >> "$GITHUB_OUTPUT"
echo "Bootc image pushed with digest: ${BOOTC_DIGEST}"
echo "Clean up local images"
podman rmi -f ${BOOTC_SRC} ${PUSH_DEST}:${TAG} ${PUSH_DEST}:latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Quote variables in podman rmi to avoid word-splitting and globbing issues.

Unquoted variables here risk word-splitting, globbing, and misbehaviour when values are empty or contain spaces/special characters. For example:

echo "Clean up local images"
podman rmi -f "${BOOTC_SRC}" "${PUSH_DEST}:${TAG}" "${PUSH_DEST}:latest"

If you want best-effort cleanup that doesn’t fail when an image is missing, consider podman rmi --ignore instead of relying on -f alone.

echo "push_dest=${PUSH_DEST}:${TAG}" >> "$GITHUB_OUTPUT"

- name: Build disk image
working-directory: node-images/fedora
run: |
BOOTC_DIGEST="${{ steps.push-bootc.outputs.digest }}"
if [ -n "${BOOTC_DIGEST}" ]; then
make build-disk-image BOOTC_DIGEST="${BOOTC_DIGEST}"
PUSH_DEST="${{ steps.push-bootc.outputs.push_dest }}"
if [ -n "${BOOTC_DIGEST}" ] && [ -n "${PUSH_DEST}" ]; then
podman pull "${PUSH_DEST}"
make build-disk-image BOOTC_IMAGE="${PUSH_DEST}" BOOTC_DIGEST="${BOOTC_DIGEST}"
else
make build-disk-image
fi
Expand Down
2 changes: 1 addition & 1 deletion node-images/fedora/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ build-bootc-image:
@echo "✅ Bootc image built: $(BOOTC_IMAGE)"

# Build the disk image (qcow2 in a scratch container, for use as a podman image volume)
build-disk-image: build-bootc-image
Comment thread
alicefr marked this conversation as resolved.
build-disk-image:
@echo "=== Building node image with qcow2 disk ==="
STORAGE_PATH=$$(podman info --format '{{.Store.GraphRoot}}') && \
if [ -z "$(BOOTC_DIGEST)" ]; then \
Expand Down
Loading