From ea34910f97a6052490812c7a0a4ce1e68fafa459 Mon Sep 17 00:00:00 2001 From: Dimitris Karakasilis Date: Mon, 12 Aug 2024 15:56:56 +0300 Subject: [PATCH] Don't use earthly to build the upgrade image because the target needs to be adapted to accept a local dir and it's a mess in Earthly Signed-off-by: Dimitris Karakasilis --- .github/workflows/reusable-uki-test.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable-uki-test.yaml b/.github/workflows/reusable-uki-test.yaml index b75cfa10c..a1cbc6b8d 100644 --- a/.github/workflows/reusable-uki-test.yaml +++ b/.github/workflows/reusable-uki-test.yaml @@ -81,15 +81,18 @@ jobs: - name: Build uki upgrade image 🔧 run: | rm -rf /tmp/unpacked - sudo luet util unpack "${TEMP_IMAGE}" /tmp/unpacked + sudo luet util unpack "${TEMP_IMAGE}" ./unpacked new_version="mynewversion" - sudo sed -i 's/^KAIROS_VERSION=.*/KAIROS_VERSION='$new_version'/' /tmp/unpacked/etc/os-release + sudo sed -i 's/^KAIROS_VERSION=.*/KAIROS_VERSION='$new_version'/' ./unpacked/etc/os-release echo "$new_version" > "${PWD}/build/expected_new_version" - earthly +uki-iso \ - --BASE_IMAGE=dir:/tmp/unpacked \ - --ENKI_KEYS_DIR=tests/assets/keys/ \ - --ENKI_OUTPUT_TYPE=container + docker run --rm \ + -v $PWD/unpacked:/unpacked \ + -v $PWD/build:/result \ + -v $PWD/tests/assets/keys:/keys \ + quay.io/kairos/osbuilder-tools:latest build-uki dir:/unpacked \ + --output-dir /result --keys /keys --output-type container \ + --single-efi-cmdline "myentry: foobar" docker load -i build/*.tar image=$(docker load -i build/*.tar | grep "Loaded image" | awk -F: '{ st = index($0,":");print substr($0,st+1)}')