From 4c91c4871010b5bf28bdd7e76b83e1931d52c997 Mon Sep 17 00:00:00 2001 From: renner <80410025+renner0e@users.noreply.github.com> Date: Sat, 4 Jul 2026 14:15:05 +0200 Subject: [PATCH] feat(ci): rootless CI (#2496) * feat(ci): rootless CI 26.04 runners use sudo-rs, which does not support this flag. It doesn't seem to have broken too much, Only thing I could see is the github token not being passed to the build. ``` sudo: preserving the entire environment is not supported, '-E' is ignored ``` So this is a good time to move over to a rootless CI I guess. * chore: unset target-dir for container-storage-action This defaults to the user container storage --- .github/workflows/reusable-build.yml | 21 ++++++++++----------- Justfile | 2 ++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 0fe08052..fc46158e 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -73,7 +73,6 @@ jobs: uses: ublue-os/container-storage-action@25e05be4948f77746938687877829d15c5038036 continue-on-error: true with: - target-dir: /var/lib/containers mount-opts: compress-force=zstd:2 loopback-free: '1' @@ -157,7 +156,7 @@ jobs: MATRIX_STREAM_NAME: ${{ matrix.stream_name }} MATRIX_IMAGE_FLAVOR: ${{ matrix.image_flavor }} run: | - sudo -E $(command -v just) \ + $(command -v just) \ repo_organization="${{ github.repository_owner }}" \ build \ --image "${MATRIX_BASE_NAME}" \ @@ -170,7 +169,7 @@ jobs: shell: bash id: cache-perms run: | - sudo chmod 777 --recursive /var/tmp/buildah-cache-0 + chmod 777 --recursive /var/tmp/buildah-cache-${UID} - name: Write new DNF package cache if: steps.setup-cache.outputs.allow_cache_write == 'true' @@ -188,7 +187,7 @@ jobs: MATRIX_STREAM_NAME: ${{ matrix.stream_name }} MATRIX_IMAGE_FLAVOR: ${{ matrix.image_flavor }} run: | - sudo -E $(command -v just) rechunk \ + $(command -v just) rechunk \ --image "${MATRIX_BASE_NAME}" \ --tag "${MATRIX_STREAM_NAME}" \ --flavor "${MATRIX_IMAGE_FLAVOR}" @@ -207,7 +206,7 @@ jobs: MATRIX_IMAGE_FLAVOR: ${{ matrix.image_flavor }} SYFT_CMD: ${{ steps.setup-syft.outputs.cmd }} run: | - sudo -E $(command -v just) gen-sbom \ + $(command -v just) gen-sbom \ --image "${MATRIX_BASE_NAME}" \ --tag "${MATRIX_STREAM_NAME}" \ --flavor "${MATRIX_IMAGE_FLAVOR}" \ @@ -221,7 +220,7 @@ jobs: MATRIX_STREAM_NAME: ${{ matrix.stream_name }} MATRIX_IMAGE_FLAVOR: ${{ matrix.image_flavor }} run: | - sudo -E $(command -v just) secureboot \ + $(command -v just) secureboot \ --image "${MATRIX_BASE_NAME}" \ --tag "${MATRIX_STREAM_NAME}" \ --flavor "${MATRIX_IMAGE_FLAVOR}" @@ -234,7 +233,7 @@ jobs: MATRIX_STREAM_NAME: ${{ matrix.stream_name }} MATRIX_IMAGE_FLAVOR: ${{ matrix.image_flavor }} run: | - sudo -E $(command -v just) export-oci \ + $(command -v just) export-oci \ --image "${MATRIX_BASE_NAME}" \ --tag "${MATRIX_STREAM_NAME}" \ --flavor "${MATRIX_IMAGE_FLAVOR}" @@ -260,7 +259,7 @@ jobs: MATRIX_STREAM_NAME: ${{ matrix.stream_name }} MATRIX_IMAGE_FLAVOR: ${{ matrix.image_flavor }} run: | - sudo -E $(command -v just) disk-image \ + $(command -v just) disk-image \ --image "${MATRIX_BASE_NAME}" \ --tag "${MATRIX_STREAM_NAME}" \ --flavor "${MATRIX_IMAGE_FLAVOR}" \ @@ -309,7 +308,7 @@ jobs: ALIAS_TAGS: ${{ steps.generate-tags.outputs.alias_tags }} run: | set -eoux pipefail - sudo -E $(command -v just) tag-images \ + $(command -v just) tag-images \ --image "${IMAGE_NAME}" \ --default-tag "${MATRIX_STREAM_NAME}" \ --tags "${ALIAS_TAGS}" @@ -346,7 +345,7 @@ jobs: run: | set -euox pipefail - sudo -E $(command -v just) push-image \ + $(command -v just) push-image \ --image "${MATRIX_BASE_NAME}" \ --tag "${MATRIX_STREAM_NAME}" \ --flavor "${MATRIX_IMAGE_FLAVOR}" \ @@ -386,7 +385,7 @@ jobs: run: | set -euox pipefail - sudo -E $(command -v just) push-image \ + $(command -v just) push-image \ --image "${MATRIX_BASE_NAME}" \ --tag "${MATRIX_STREAM_NAME}" \ --flavor "${MATRIX_IMAGE_FLAVOR}" \ diff --git a/Justfile b/Justfile index ed55e018..fb0b25e3 100644 --- a/Justfile +++ b/Justfile @@ -841,6 +841,8 @@ disk-image $image="aurora" $tag="latest" $flavor="main" $ghcr="false" $backend=" BOOTC_INSTALL_ARGS+=("--bootloader systemd" "--composefs-backend") fi + {{ just }} load-rootful --image "${image}" --tag "${tag}" --flavor "${flavor}" + {{ just }} bootc "${image}" "${tag}" "${flavor}" install to-disk "${BOOTC_INSTALL_ARGS[@]}" # FIXME: Please consider using podman push in the future for signing as well instead of temporary tag + cosign