Skip to content

Commit

Permalink
Don't use earthly to build the upgrade image
Browse files Browse the repository at this point in the history
because the target needs to be adapted to accept a local dir and it's a
mess in Earthly

Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily committed Aug 12, 2024
1 parent 317fc5a commit ea34910
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/reusable-uki-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)}')
Expand Down

0 comments on commit ea34910

Please sign in to comment.