Skip to content

gha: use ghcr registry instead of local registry for staging - #122

Merged
alicefr merged 1 commit into
bootc-dev:mainfrom
alicefr:add-stage-ghcr
Aug 21, 2026
Merged

gha: use ghcr registry instead of local registry for staging#122
alicefr merged 1 commit into
bootc-dev:mainfrom
alicefr:add-stage-ghcr

Conversation

@alicefr

@alicefr alicefr commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Once we create the oci archive, the digest of the image changes.
Therefore, it doesn't match with the digest reported by bootc and set it
to the disk image, and the bootc-operator CI is failing in pulling the
correct image.

In order to preserve the digest, we push a temporary image per PR which
will be moved to the final image once the PR is merged and the CI
succeeds.

Unfortunately, we cannot rely on the local registry since isn't shared
across multiple stages. The local registry will be used only on fork
because we don't have write access to the ghcr registry.

Bink doesn't require to pull the node image by digest, so running the
integration tests from the oci-archive is fine.

Once we create the oci archive, the digest of the image changes.
Therefore, it doesn't match with the digest reported by bootc and set it
to the disk image, and the bootc-operator CI is failing in pulling the
correct image.

In order to preserve the digest, we push a temporary image per PR which
will be moved to the final image once the PR is merged and the CI
succeeds.

Unfortunately, we cannot rely on the local registry since isn't shared
across multiple stages. The local registry will be used only on fork
because we don't have write access to the ghcr registry.

Bink doesn't require to pull the node image by digest, so running the
integration tests from the oci-archive is fine.

Assisted-by: AI
Signed-off-by: Alice Frosi <afrosi@redhat.com>
@alicefr

alicefr commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator Author

/cc @Johan-Liebert1

@alicefr
alicefr requested a review from Johan-Liebert1 August 20, 2026 20:57

@Johan-Liebert1 Johan-Liebert1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This still wouldn't work, I think. Since the bcvk command still installs the image in containers-storage. We'd want to pass --image-to-install <registry_image> to bcvk to-disk command

ALL=$(curl -s https://endoflife.date/api/kubernetes.json | \
jq -c '[.[] | select(.eol > (now | strftime("%Y-%m-%d"))) | .cycle][:3]')
NON_DEFAULT=$(echo "$ALL" | jq -c --arg default "$DEFAULT" 'map(select(. != $default))')
BRANCH_TAG=$(echo "${{ github.head_ref || github.ref_name }}" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9._-]+/-/g')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A comment about what this is trying to do would be nice

@alicefr

alicefr commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

The local registry fixed the digest mistmatch, for ostree at least. I have tested the previous run with the registry only and the digest matched with the one in the label. The problem now is that the digest changes when we transform it in an archive. Do you mean for the composefs only or ostree as well?

@Johan-Liebert1

Copy link
Copy Markdown
Collaborator

Correct me if I'm wrong here. The final bcvk command currently looks like

bcvk to-disk -K \
--karg 'console=tty0' \
--karg 'console=ttyS0,115200n8' \
--karg 'console=hvc0' \
--filesystem ext4 \
--format qcow2 \
--memory ${MEMORY} \
--disk-size ${DISK_SIZE} \
--log-dir journal,console=${LOG_DIR} \
${BCVK_EXTRA_ARGS} \
ghcr.io/... \
/output/disk.qcow2

which would just use the ghcr image in containers storage as the install target which would again produce the uncompressed manifest digest. That is the reason I added --image-to-install in bootc-dev/bcvk#314, so that we can pass --image-to-install docker://ghcr.io/... so as to explicitly ask bcvk and in turn skopeo to pull from the registry

@alicefr

alicefr commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

I think, but need to test it, once we remove the image built locally we will only have the image with the remote digest. It was the previous behavior at least, before I refactored the integration tests to run after the images node build which broke the CI.

@alicefr

alicefr commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

We can give it a try and see. Unfortunately, those changes are hard to test before merging

@alicefr
alicefr merged commit f74a3f0 into bootc-dev:main Aug 21, 2026
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants