diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 97eb61d..5b42301 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -65,7 +65,7 @@ jobs: exit 1 fi - kernel=$(skopeo inspect docker://ghcr.io/ublue-os/coreos-${{ inputs.coreos_version }}-kernel:${fedora} | jq -r '.["Labels"]["ostree.linux"]') + kernel=$(skopeo inspect docker://ghcr.io/ublue-os/akmods:${{ inputs.coreos_version }}-${fedora} | jq -r '.["Labels"]["ostree.linux"]') if [ -z "$kernel" ] || [ "null" = "$kernel" ]; then echo "inspected linux (kernel) version must not be empty or null" exit 1 @@ -121,7 +121,6 @@ jobs: # pull the base image used for FROM in containerfile so # we can retry on that unfortunately common failure case podman pull quay.io/fedora/fedora-coreos:${{ inputs.coreos_version }} - podman pull ${{ env.IMAGE_REGISTRY }}/${{ env.KERNEL_FLAVOR }}-kernel:${{ env.FEDORA_VERSION }} podman pull ${{ env.IMAGE_REGISTRY }}/akmods:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} podman pull ${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} podman pull ${{ env.IMAGE_REGISTRY }}/akmods-zfs:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} @@ -143,14 +142,6 @@ jobs: echo "env.KERNEL_VERSION must not be empty or null" exit 1 fi - - #Use Podman Inspect instead of skopeo for local checks. - podman inspect ${{ env.IMAGE_REGISTRY }}/${{ env.KERNEL_FLAVOR }}-kernel:${{ env.FEDORA_VERSION }} > inspect.json - kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json) - if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then - echo "pulled kernel-cache image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})" - exit 1 - fi podman inspect ${{ env.IMAGE_REGISTRY }}/akmods:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json) if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then @@ -387,7 +378,6 @@ jobs: # pull the base image used for FROM in containerfile so # we can retry on that unfortunately common failure case podman pull quay.io/fedora/fedora-coreos:${{ inputs.coreos_version }} - podman pull ${{ env.IMAGE_REGISTRY }}/${{ env.KERNEL_FLAVOR }}-kernel:${{ env.FEDORA_VERSION }} podman pull ${{ env.IMAGE_REGISTRY }}/akmods:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} podman pull ${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} podman pull ${{ env.IMAGE_REGISTRY }}/akmods-zfs:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} @@ -409,12 +399,6 @@ jobs: echo "env.KERNEL_VERSION must not be empty or null" exit 1 fi - podman inspect ${{ env.IMAGE_REGISTRY }}/${{ env.KERNEL_FLAVOR }}-kernel:${{ env.FEDORA_VERSION }} > inspect.json - kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json) - if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then - echo "pulled kernel-cache image kernel ($kernel) does not match expected kernel (${{ env.KERNEL_VERSION }})" - exit 1 - fi podman inspect ${{ env.IMAGE_REGISTRY }}/akmods:${{ env.KERNEL_FLAVOR }}-${{ env.FEDORA_VERSION }} > inspect.json kernel=$(jq -r '.[]["Config"]["Labels"]["ostree.linux"]' inspect.json) if [[ "${{ env.KERNEL_VERSION }}" != "$kernel"* ]]; then diff --git a/fedora-coreos/Containerfile b/fedora-coreos/Containerfile index c45ded7..0a32cb1 100644 --- a/fedora-coreos/Containerfile +++ b/fedora-coreos/Containerfile @@ -8,12 +8,10 @@ ARG AKMODS_COMMON="${IMAGE_REGISTRY}/akmods:${KERNEL_FLAVOR}-${FEDORA_VERSION}" ARG AKMODS_NVIDIA="${IMAGE_REGISTRY}/akmods-nvidia:${KERNEL_FLAVOR}-${FEDORA_VERSION}" ARG AKMODS_ZFS="${IMAGE_REGISTRY}/akmods-zfs:${KERNEL_FLAVOR}-${FEDORA_VERSION}" ARG CONFIG="${IMAGE_REGISTRY}/config:latest" -ARG KERNEL="${IMAGE_REGISTRY}/${KERNEL_FLAVOR}-kernel:${FEDORA_VERSION}" FROM ${AKMODS_COMMON} AS akmods-common FROM ${AKMODS_NVIDIA} AS akmods-nvidia FROM ${AKMODS_ZFS} AS akmods-zfs FROM ${CONFIG} AS config -FROM ${KERNEL} AS kernel FROM scratch AS ctx COPY / / @@ -33,7 +31,7 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \ --mount=type=bind,from=akmods-nvidia,src=/rpms,dst=/tmp/rpms/akmods-nvidia \ --mount=type=bind,from=akmods-zfs,src=/rpms,dst=/tmp/rpms/akmods-zfs \ --mount=type=bind,from=config,src=/rpms,dst=/tmp/rpms/config \ - --mount=type=bind,from=kernel,src=/tmp/rpms,dst=/tmp/rpms/kernel \ + --mount=type=bind,from=akmods-common,src=/kernel-rpms,dst=/tmp/rpms/kernel \ mkdir -p /var/lib/alternatives \ && /ctx/install.sh \ && /ctx/post-install.sh \ diff --git a/ucore/Containerfile b/ucore/Containerfile index 8d50c8a..995d483 100644 --- a/ucore/Containerfile +++ b/ucore/Containerfile @@ -8,12 +8,10 @@ ARG AKMODS_COMMON="${IMAGE_REGISTRY}/akmods:${KERNEL_FLAVOR}-${FEDORA_VERSION}" ARG AKMODS_NVIDIA="${IMAGE_REGISTRY}/akmods-nvidia:${KERNEL_FLAVOR}-${FEDORA_VERSION}" ARG AKMODS_ZFS="${IMAGE_REGISTRY}/akmods-zfs:${KERNEL_FLAVOR}-${FEDORA_VERSION}" ARG CONFIG="${IMAGE_REGISTRY}/config:latest" -ARG KERNEL="${IMAGE_REGISTRY}/${KERNEL_FLAVOR}-kernel:${FEDORA_VERSION}" FROM ${AKMODS_COMMON} AS akmods-common FROM ${AKMODS_NVIDIA} AS akmods-nvidia FROM ${AKMODS_ZFS} AS akmods-zfs FROM ${CONFIG} AS config -FROM ${KERNEL} AS kernel FROM scratch AS ctx COPY / / @@ -42,7 +40,7 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \ --mount=type=bind,from=akmods-nvidia,src=/rpms,dst=/tmp/rpms/akmods-nvidia \ --mount=type=bind,from=akmods-zfs,src=/rpms,dst=/tmp/rpms/akmods-zfs \ --mount=type=bind,from=config,src=/rpms,dst=/tmp/rpms/config \ - --mount=type=bind,from=kernel,src=/tmp/rpms,dst=/tmp/rpms/kernel \ + --mount=type=bind,from=akmods-common,src=/kernel-rpms,dst=/tmp/rpms/kernel \ mkdir -p /var/lib/alternatives \ && /ctx/install-ucore-minimal.sh \ && /ctx/post-install-ucore-minimal.sh \