ci: test changes
Some checks failed
Build containers / Build and push image (asahi-cosmic, 43) (push) Failing after 3m54s

This commit is contained in:
2026-02-27 22:21:40 +01:00
parent 5899034478
commit c7e2256b5d

View File

@@ -15,23 +15,28 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
image: [asahi-cosmic] image: [asahi-cosmic]
version: [43] #Build current stable,next stable/rawhide (if not branched) version: [43]
container: container:
image: "quay.io/fedora-ostree-desktops/buildroot:${{ matrix.version }}" image: "quay.io/fedora-ostree-desktops/buildroot:${{ matrix.version }}"
options: "--security-opt=label=disable --privileged --user 0:0 --device=/dev/fuse --volume /:/run/host:rw" options: "--security-opt=label=disable --privileged --user 0:0 --device=/dev/fuse --volume /:/run/host:rw"
steps: steps:
- name: Install latest rpm-ostree package from testing repos - name: Install rpm-ostree + tools
run: | run: |
dnf upgrade -y --enablerepo=updates-testing --refresh rpm-ostree dnf upgrade -y --enablerepo=updates-testing --refresh rpm-ostree
dnf install -y nodejs dnf install -y nodejs skopeo jq
mkdir -p ~/.docker mkdir -p ~/.docker
- name: Fix containers/storage.conf
run: |
sed -i 's/driver = "overlay"/driver = "vfs"/' /usr/share/containers/storage.conf
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Log in - name: Log in to registry
uses: redhat-actions/podman-login@v1 uses: redhat-actions/podman-login@v1
with: with:
registry: git.plabble.org registry: git.plabble.org
@@ -39,27 +44,73 @@ jobs:
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
auth_file_path: /tmp/auth.json auth_file_path: /tmp/auth.json
- name: Build rootfs - name: Debug paths
run: | run: |
sudo ./builder.sh asahi-cosmic 43 pwd
ls -l
ls -l images || echo "images/ missing"
ls -l images/asahi-cosmic || echo "image dir missing"
ls -l images/asahi-cosmic/manifest.yaml || echo "manifest missing"
- name: Build container - name: Build OCI archive with rpm-ostree
id: build run: |
uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef cd "$GITHUB_WORKSPACE"
with: sudo -E ./builder.sh "${{ matrix.image }}" "${{ matrix.version }}"
image: misthios/${{ matrix.image }}
tags: ${{ matrix.version }}
containerfiles: ./Containerfile
build-args: IMAGE=${{ matrix.image }}
- name: Push - name: Normalize and push image to registry
uses: redhat-actions/push-to-registry@v2 run: |
with: set -xeuo pipefail
image: ${{ steps.build.outputs.image }}
tags: ${{ steps.build.outputs.tags }} IMAGE="${{ matrix.image }}"
registry: git.plabble.org VERSION="${{ matrix.version }}"
username: ${{ secrets.REGISTRY_USERNAME }} REGISTRY="git.plabble.org/misthios"
password: ${{ secrets.REGISTRY_TOKEN }} ARCHIVE="images/${IMAGE}/manifest.ociarchive"
extra-args: |
--compression-format=zstd # Build ID (YYYYMMDD.0)
--compression-level=12 if [[ -f ".buildid" ]]; then
buildid="$(< .buildid)"
else
buildid="$(date '+%Y%m%d.0')"
echo "${buildid}" > .buildid
fi
# Extract version from os-release mutation
version="$(rpm-ostree compose tree --print-only --repo=repo images/${IMAGE}/manifest.yaml | jq -r '."mutate-os-release"')"
full_tag="${version}.${buildid}"
echo "Normalizing build output → OCI layout"
# Clean previous normalized layout
rm -rf oci
mkdir -p oci
# Detect file vs directory output
if [[ -f "${ARCHIVE}" ]]; then
echo "Detected OCI archive file"
skopeo copy \
--authfile /tmp/auth.json \
oci-archive:${ARCHIVE} \
oci:oci:${IMAGE}
else
echo "Detected directory output"
skopeo copy \
--authfile /tmp/auth.json \
dir:${ARCHIVE} \
oci:oci:${IMAGE}
fi
echo "Pushing normalized OCI layout → registry"
skopeo copy \
--authfile /tmp/auth.json \
oci:oci:${IMAGE} \
docker://${REGISTRY}/${IMAGE}:${full_tag}
skopeo copy \
--authfile /tmp/auth.json \
oci:oci:${IMAGE} \
docker://${REGISTRY}/${IMAGE}:${version}
echo "Pushed:"
echo " - ${REGISTRY}/${IMAGE}:${full_tag}"
echo " - ${REGISTRY}/${IMAGE}:${version}"