From 97f6a3231bffd94f13ed3203f9cacee8bd481dcd Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 19 Sep 2024 10:11:50 +0100 Subject: [PATCH 01/22] feat: rechunk images into smaller parts --- .github/workflows/build-39-aurora.yml | 40 ++++++++++---------- .github/workflows/build-40-aurora.yml | 54 +++++++++++++-------------- .github/workflows/reusable-build.yml | 24 +++++++++--- 3 files changed, 66 insertions(+), 52 deletions(-) diff --git a/.github/workflows/build-39-aurora.yml b/.github/workflows/build-39-aurora.yml index 9f66952002a..dcb59b983f6 100644 --- a/.github/workflows/build-39-aurora.yml +++ b/.github/workflows/build-39-aurora.yml @@ -1,21 +1,21 @@ -name: Aurora 39 -on: - pull_request: - branches: - - main - - testing - paths-ignore: - - '**.md' - - 'system_files/silverblue/**' - schedule: - - cron: '41 5 * * 0' # 5:41 UTC Weekly on Sunday - workflow_dispatch: +# name: Aurora 39 +# on: +# pull_request: +# branches: +# - main +# - testing +# paths-ignore: +# - '**.md' +# - 'system_files/silverblue/**' +# schedule: +# - cron: '41 5 * * 0' # 5:41 UTC Weekly on Sunday +# workflow_dispatch: -jobs: - build: - name: build - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - with: - brand_name: aurora - fedora_version: 39 +# jobs: +# build: +# name: build +# uses: ./.github/workflows/reusable-build.yml +# secrets: inherit +# with: +# brand_name: aurora +# fedora_version: 39 diff --git a/.github/workflows/build-40-aurora.yml b/.github/workflows/build-40-aurora.yml index 4db70f405c9..316d47b23c8 100644 --- a/.github/workflows/build-40-aurora.yml +++ b/.github/workflows/build-40-aurora.yml @@ -1,28 +1,28 @@ -name: Aurora 40 -on: - merge_group: - pull_request: - branches: - - main - - testing - paths-ignore: - - '**.md' - - 'system_files/silverblue/**' - push: - branches: - - main - paths-ignore: - - '**.md' - - 'system_files/silverblue/**' - schedule: - - cron: '40 4 * * *' # 4:40 UTC everyday - workflow_dispatch: +# name: Aurora 40 +# on: +# merge_group: +# pull_request: +# branches: +# - main +# - testing +# paths-ignore: +# - '**.md' +# - 'system_files/silverblue/**' +# push: +# branches: +# - main +# paths-ignore: +# - '**.md' +# - 'system_files/silverblue/**' +# schedule: +# - cron: '40 4 * * *' # 4:40 UTC everyday +# workflow_dispatch: -jobs: - build: - name: build - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - with: - brand_name: aurora - fedora_version: 40 +# jobs: +# build: +# name: build +# uses: ./.github/workflows/reusable-build.yml +# secrets: inherit +# with: +# brand_name: aurora +# fedora_version: 40 diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index f36770a834b..498498127e3 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -34,13 +34,13 @@ jobs: image_flavor: - main - nvidia - - asus - - asus-nvidia - - surface - - surface-nvidia + # - asus + # - asus-nvidia + # - surface + # - surface-nvidia base_name: - ${{ inputs.brand_name }} - - ${{ inputs.brand_name }}-dx + # - ${{ inputs.brand_name }}-dx fedora_version: - ${{ inputs.fedora_version }} exclude: @@ -293,6 +293,20 @@ jobs: kernel_suffix: ${{ env.KERNEL_SUFFIX }} strip: false + - name: Check Pre Rechunk + run: + podman image ls + + - name: Rechunk Image + uses: hhd-dev/rechunk@main + with: + ref: ${{ steps.build_image.outputs.image }}@{{ steps.generate-tags.outputs.DEFAULT_TAG }} + skip_compression: 'true' + + - name: Check Post Rechunk + run: + podman image ls + # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. # https://github.com/macbre/push-to-ghcr/issues/12 - name: Lowercase Registry From d6739364aa4fd294cfd37a56ac99798cc0ddbf51 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 19 Sep 2024 10:15:08 +0100 Subject: [PATCH 02/22] chore: temporarily disable unwanted builds --- .github/workflows/build-beta-aurora.yml | 54 +++++++++++----------- .github/workflows/build-beta-bluefin.yml | 54 +++++++++++----------- .github/workflows/build-coreos-aurora.yml | 40 ++++++++-------- .github/workflows/build-coreos-bluefin.yml | 40 ++++++++-------- .github/workflows/build-latest-bluefin.yml | 54 +++++++++++----------- 5 files changed, 121 insertions(+), 121 deletions(-) diff --git a/.github/workflows/build-beta-aurora.yml b/.github/workflows/build-beta-aurora.yml index 84d6a68d7aa..8cfe1254f27 100644 --- a/.github/workflows/build-beta-aurora.yml +++ b/.github/workflows/build-beta-aurora.yml @@ -1,28 +1,28 @@ -name: Aurora Beta -on: - # merge_group: - # pull_request: - # branches: - # - main - # - testing - # paths-ignore: - # - "**.md" - # - "system_files/silverblue/**" - # push: - # branches: - # - main - # paths-ignore: - # - "**.md" - # - "system_files/silverblue/**" - # schedule: - # - cron: "40 4 * * *" # 4:40 UTC everyday - workflow_dispatch: +# name: Aurora Beta +# on: +# # merge_group: +# # pull_request: +# # branches: +# # - main +# # - testing +# # paths-ignore: +# # - "**.md" +# # - "system_files/silverblue/**" +# # push: +# # branches: +# # - main +# # paths-ignore: +# # - "**.md" +# # - "system_files/silverblue/**" +# # schedule: +# # - cron: "40 4 * * *" # 4:40 UTC everyday +# workflow_dispatch: -jobs: - build: - name: build - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - with: - brand_name: aurora - fedora_version: beta +# jobs: +# build: +# name: build +# uses: ./.github/workflows/reusable-build.yml +# secrets: inherit +# with: +# brand_name: aurora +# fedora_version: beta diff --git a/.github/workflows/build-beta-bluefin.yml b/.github/workflows/build-beta-bluefin.yml index 9e20f414a7b..617a4ef2b60 100644 --- a/.github/workflows/build-beta-bluefin.yml +++ b/.github/workflows/build-beta-bluefin.yml @@ -1,28 +1,28 @@ -name: Bluefin Beta -on: - # merge_group: - # pull_request: - # branches: - # - main - # - testing - # paths-ignore: - # - "**.md" - # - "system_files/silverblue/**" - # push: - # branches: - # - main - # paths-ignore: - # - "**.md" - # - "system_files/silverblue/**" - # schedule: - # - cron: "40 4 * * *" # 4:40 UTC everyday - workflow_dispatch: +# name: Bluefin Beta +# on: +# # merge_group: +# # pull_request: +# # branches: +# # - main +# # - testing +# # paths-ignore: +# # - "**.md" +# # - "system_files/silverblue/**" +# # push: +# # branches: +# # - main +# # paths-ignore: +# # - "**.md" +# # - "system_files/silverblue/**" +# # schedule: +# # - cron: "40 4 * * *" # 4:40 UTC everyday +# workflow_dispatch: -jobs: - build: - name: build - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - with: - brand_name: bluefin - fedora_version: beta +# jobs: +# build: +# name: build +# uses: ./.github/workflows/reusable-build.yml +# secrets: inherit +# with: +# brand_name: bluefin +# fedora_version: beta diff --git a/.github/workflows/build-coreos-aurora.yml b/.github/workflows/build-coreos-aurora.yml index 8a9093e0791..40422d745d5 100644 --- a/.github/workflows/build-coreos-aurora.yml +++ b/.github/workflows/build-coreos-aurora.yml @@ -1,21 +1,21 @@ -name: Aurora Stable -on: - pull_request: - branches: - - main - - testing - paths-ignore: - - '**.md' - - 'system_files/silverblue/**' - schedule: - - cron: '41 5 * * 2' # 5:41 UTC every Tuesday - workflow_dispatch: +# name: Aurora Stable +# on: +# pull_request: +# branches: +# - main +# - testing +# paths-ignore: +# - '**.md' +# - 'system_files/silverblue/**' +# schedule: +# - cron: '41 5 * * 2' # 5:41 UTC every Tuesday +# workflow_dispatch: -jobs: - build: - name: build - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - with: - brand_name: aurora - fedora_version: stable +# jobs: +# build: +# name: build +# uses: ./.github/workflows/reusable-build.yml +# secrets: inherit +# with: +# brand_name: aurora +# fedora_version: stable diff --git a/.github/workflows/build-coreos-bluefin.yml b/.github/workflows/build-coreos-bluefin.yml index 18d6e80b1d7..886c3a38e6f 100644 --- a/.github/workflows/build-coreos-bluefin.yml +++ b/.github/workflows/build-coreos-bluefin.yml @@ -1,21 +1,21 @@ -name: Bluefin Stable -on: - pull_request: - branches: - - main - - testing - paths-ignore: - - '**.md' - - 'system_files/kinoite/**' - schedule: - - cron: '41 5 * * 2' # 5:41 UTC every Tuesday - workflow_dispatch: +# name: Bluefin Stable +# on: +# pull_request: +# branches: +# - main +# - testing +# paths-ignore: +# - '**.md' +# - 'system_files/kinoite/**' +# schedule: +# - cron: '41 5 * * 2' # 5:41 UTC every Tuesday +# workflow_dispatch: -jobs: - build: - name: build - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - with: - brand_name: bluefin - fedora_version: stable +# jobs: +# build: +# name: build +# uses: ./.github/workflows/reusable-build.yml +# secrets: inherit +# with: +# brand_name: bluefin +# fedora_version: stable diff --git a/.github/workflows/build-latest-bluefin.yml b/.github/workflows/build-latest-bluefin.yml index 9ef35430ad6..b6fa8db5616 100644 --- a/.github/workflows/build-latest-bluefin.yml +++ b/.github/workflows/build-latest-bluefin.yml @@ -1,28 +1,28 @@ -name: Bluefin Latest -on: - merge_group: - pull_request: - branches: - - main - - testing - paths-ignore: - - '**.md' - - 'system_files/kinoite/**' - push: - branches: - - main - paths-ignore: - - '**.md' - - 'system_files/kinoite/**' - schedule: - - cron: '40 4 * * *' # 4:40 UTC everyday - workflow_dispatch: +# name: Bluefin Latest +# on: +# merge_group: +# pull_request: +# branches: +# - main +# - testing +# paths-ignore: +# - '**.md' +# - 'system_files/kinoite/**' +# push: +# branches: +# - main +# paths-ignore: +# - '**.md' +# - 'system_files/kinoite/**' +# schedule: +# - cron: '40 4 * * *' # 4:40 UTC everyday +# workflow_dispatch: -jobs: - build: - name: build - uses: ./.github/workflows/reusable-build.yml - secrets: inherit - with: - brand_name: bluefin - fedora_version: latest +# jobs: +# build: +# name: build +# uses: ./.github/workflows/reusable-build.yml +# secrets: inherit +# with: +# brand_name: bluefin +# fedora_version: latest From 5b51849b9365f1eec6c44f46e6be55f2b968dbcb Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 19 Sep 2024 10:16:00 +0100 Subject: [PATCH 03/22] fix: use master branch of rechunk action --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 77760c90dbc..65cb7b35e92 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -374,7 +374,7 @@ jobs: podman image ls - name: Rechunk Image - uses: hhd-dev/rechunk@main + uses: hhd-dev/rechunk@master with: ref: ${{ steps.build_image.outputs.image }}@{{ steps.generate-tags.outputs.DEFAULT_TAG }} skip_compression: 'true' From d8d24c41c448ac0aa0b2e01da1f8aa20aee88927 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 19 Sep 2024 10:24:42 +0100 Subject: [PATCH 04/22] fix: properly set tag --- .github/workflows/reusable-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 65cb7b35e92..eb24e08dfd0 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -33,7 +33,7 @@ jobs: matrix: image_flavor: - main - - nvidia + # - nvidia # - asus # - asus-nvidia # - surface @@ -376,7 +376,7 @@ jobs: - name: Rechunk Image uses: hhd-dev/rechunk@master with: - ref: ${{ steps.build_image.outputs.image }}@{{ steps.generate-tags.outputs.DEFAULT_TAG }} + ref: ${{ steps.build_image.outputs.image }}@${{ steps.generate-tags.outputs.DEFAULT_TAG }} skip_compression: 'true' - name: Check Post Rechunk From 0a61c9a3e1c0a9d66a0a309ed948ced00a29f75b Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 19 Sep 2024 10:33:18 +0100 Subject: [PATCH 05/22] fix: read default tag from environment variables --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index eb24e08dfd0..fa4ab1bd977 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -376,7 +376,7 @@ jobs: - name: Rechunk Image uses: hhd-dev/rechunk@master with: - ref: ${{ steps.build_image.outputs.image }}@${{ steps.generate-tags.outputs.DEFAULT_TAG }} + ref: ${{ steps.build_image.outputs.image }}@${{ env.DEFAULT_TAG }} skip_compression: 'true' - name: Check Post Rechunk From 43083d8cde85dc23c7a0fcc37f5397d069ad12ba Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 19 Sep 2024 10:45:26 +0100 Subject: [PATCH 06/22] fix: load rechunked image after build --- .github/workflows/reusable-build.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index fa4ab1bd977..f40560b038b 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -374,12 +374,21 @@ jobs: podman image ls - name: Rechunk Image + id: rechunk uses: hhd-dev/rechunk@master with: - ref: ${{ steps.build_image.outputs.image }}@${{ env.DEFAULT_TAG }} + ref: ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} skip_compression: 'true' - - name: Check Post Rechunk + - name: Switch Rechunked Image Name + run: | + IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }}) + sudo rm -rf ${{ steps.rechunk.outputs.output }} + for tag in ${{ steps.build_image.outputs.tags }}; do + podman tag $IMAGE ${{ env.IMAGE_NAME }}:${tag} + done + + - name: Check Pre Rechunk run: podman image ls From 336e298cb4855725a8be5c45bf1503efe63ad028 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Wed, 25 Sep 2024 20:56:41 +0100 Subject: [PATCH 07/22] chore: move image to :latest tag before rechunk --- .github/workflows/reusable-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index f40560b038b..96ca2c9785e 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -372,14 +372,16 @@ jobs: - name: Check Pre Rechunk run: podman image ls + podman image tag ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} raw-img - name: Rechunk Image id: rechunk uses: hhd-dev/rechunk@master with: - ref: ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} + ref: raw-img skip_compression: 'true' + # Overwrite the image with the chuncked image - name: Switch Rechunked Image Name run: | IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }}) From d9f0370918afe9f3aeec5e1089d9a834d4c22d85 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Wed, 25 Sep 2024 21:07:02 +0100 Subject: [PATCH 08/22] fix: correctly use multi-line script --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 96ca2c9785e..8908c15b39e 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -370,7 +370,7 @@ jobs: sbverify --cert akmods.crt vmlinuz || exit 1 - name: Check Pre Rechunk - run: + run: | podman image ls podman image tag ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} raw-img From 65f4fea8375233cb1c3b44205310608bcdb69ed8 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Wed, 25 Sep 2024 22:54:48 +0100 Subject: [PATCH 09/22] fix: reference localhost image --- .github/workflows/reusable-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 8908c15b39e..0fb1b3ebc7f 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -373,12 +373,13 @@ jobs: run: | podman image ls podman image tag ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} raw-img + podman image ls - name: Rechunk Image id: rechunk uses: hhd-dev/rechunk@master with: - ref: raw-img + ref: localhost/raw-img skip_compression: 'true' # Overwrite the image with the chuncked image From 1adcc0f626beaab6c18746b30e7e573cf7c80669 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Wed, 25 Sep 2024 23:04:29 +0100 Subject: [PATCH 10/22] chore: use release version --- .github/workflows/reusable-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 0fb1b3ebc7f..d130a098083 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -377,8 +377,9 @@ jobs: - name: Rechunk Image id: rechunk - uses: hhd-dev/rechunk@master + uses: hhd-dev/rechunk@v0.8.1 with: + rechunk: ghcr.io/hhd-dev/rechunk:v0.8.1 ref: localhost/raw-img skip_compression: 'true' From 7e5e6ce6dcb3747de85a6c5369ddc9efd7cf0d67 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Wed, 25 Sep 2024 23:06:04 +0100 Subject: [PATCH 11/22] chore: remove localhost from rechunk ref --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index d130a098083..d9e5ae2a35a 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -380,7 +380,7 @@ jobs: uses: hhd-dev/rechunk@v0.8.1 with: rechunk: ghcr.io/hhd-dev/rechunk:v0.8.1 - ref: localhost/raw-img + ref: raw-img skip_compression: 'true' # Overwrite the image with the chuncked image From 56f351b3fd72f230015c279159f084f2514360e2 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Wed, 25 Sep 2024 23:46:46 +0100 Subject: [PATCH 12/22] fix: reference localhost image --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index d9e5ae2a35a..d130a098083 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -380,7 +380,7 @@ jobs: uses: hhd-dev/rechunk@v0.8.1 with: rechunk: ghcr.io/hhd-dev/rechunk:v0.8.1 - ref: raw-img + ref: localhost/raw-img skip_compression: 'true' # Overwrite the image with the chuncked image From 32367ee71b391b7937125d4c71dec4630308228f Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 26 Sep 2024 00:11:22 +0100 Subject: [PATCH 13/22] fix: switch image to rootful podman before rechunk --- .github/workflows/reusable-build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index d130a098083..b13f278ed0e 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -371,16 +371,17 @@ jobs: - name: Check Pre Rechunk run: | - podman image ls - podman image tag ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} raw-img - podman image ls + sudo podman image ls + sudo podman image scp $(whoami)@localhost:${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} root@localhost:: + sudo podman image ls + podman image rm ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} - name: Rechunk Image id: rechunk uses: hhd-dev/rechunk@v0.8.1 with: rechunk: ghcr.io/hhd-dev/rechunk:v0.8.1 - ref: localhost/raw-img + ref: ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} skip_compression: 'true' # Overwrite the image with the chuncked image From f39fd45f1d1546b2816a2a970156bd20e74b8977 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 26 Sep 2024 00:21:04 +0100 Subject: [PATCH 14/22] fix: install machinectl --- .github/workflows/reusable-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index b13f278ed0e..bcaa0b074bb 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -371,6 +371,7 @@ jobs: - name: Check Pre Rechunk run: | + sudo apt update && sudo apt install systemd-container sudo podman image ls sudo podman image scp $(whoami)@localhost:${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} root@localhost:: sudo podman image ls From 607bf8edfb88a864a379dd2fc84b9f60b31f00cb Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 26 Sep 2024 00:29:41 +0100 Subject: [PATCH 15/22] fix: use :: --- .github/workflows/reusable-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index bcaa0b074bb..3abc20b26ed 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -373,7 +373,7 @@ jobs: run: | sudo apt update && sudo apt install systemd-container sudo podman image ls - sudo podman image scp $(whoami)@localhost:${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} root@localhost:: + sudo podman image scp $(whoami)@localhost::${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} root@localhost:: sudo podman image ls podman image rm ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} From daa4d18f9f05110306ef63a77e0b580c5e54f730 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 26 Sep 2024 00:42:17 +0100 Subject: [PATCH 16/22] chore: remove codeql from builder --- .github/workflows/reusable-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 3abc20b26ed..165b2d84be0 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -191,6 +191,8 @@ jobs: - name: Maximize build space if: contains(matrix.base_name, '-dx') && (github.event_name == 'pull_request' && ( matrix.image_flavor == 'main' || matrix.image_flavor == 'nvidia' ) || github.event_name != 'pull_request') uses: ublue-os/remove-unwanted-software@517622d6452028f266b7ba4cc9a123b5f58a6b53 # v7 + with: + remove-codeql: true - name: Check just syntax uses: ublue-os/just-action@bda593098a84a84973b002b4377709166a68be52 # v2 From b35777f05aa0066c172fee102c36fbe8d3fc1b79 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 26 Sep 2024 00:44:08 +0100 Subject: [PATCH 17/22] chore: remove all Podman images from rootful and rootless --- .github/workflows/reusable-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 165b2d84be0..72a9481fe4d 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -374,10 +374,9 @@ jobs: - name: Check Pre Rechunk run: | sudo apt update && sudo apt install systemd-container - sudo podman image ls sudo podman image scp $(whoami)@localhost::${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} root@localhost:: sudo podman image ls - podman image rm ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} + podman rmi $(podman image ls -qa) --force - name: Rechunk Image id: rechunk @@ -390,6 +389,7 @@ jobs: # Overwrite the image with the chuncked image - name: Switch Rechunked Image Name run: | + sudo podman rmi $(sudo podman image ls -qa) --force IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }}) sudo rm -rf ${{ steps.rechunk.outputs.output }} for tag in ${{ steps.build_image.outputs.tags }}; do From 4fe8de5f5db2a7c4b96c0fd5d39ab326bc43e8f0 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 26 Sep 2024 00:57:04 +0100 Subject: [PATCH 18/22] fix: actually enable the maximize-build action --- .github/workflows/reusable-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 72a9481fe4d..3698e7a2781 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -189,7 +189,6 @@ jobs: fi - name: Maximize build space - if: contains(matrix.base_name, '-dx') && (github.event_name == 'pull_request' && ( matrix.image_flavor == 'main' || matrix.image_flavor == 'nvidia' ) || github.event_name != 'pull_request') uses: ublue-os/remove-unwanted-software@517622d6452028f266b7ba4cc9a123b5f58a6b53 # v7 with: remove-codeql: true From f9a4173c5706d20680dd820f5d410b2dd45053ab Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 26 Sep 2024 01:18:26 +0100 Subject: [PATCH 19/22] feat: add image labels, rename steps and use previous image ref when generating chunks --- .github/workflows/reusable-build.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 3698e7a2781..d8aaf7bcd9f 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -370,11 +370,18 @@ jobs: sbverify --cert kernel-sign.crt vmlinuz || exit 1 sbverify --cert akmods.crt vmlinuz || exit 1 - - name: Check Pre Rechunk + # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. + # https://github.com/macbre/push-to-ghcr/issues/12 + - name: Lowercase Registry + id: registry_case + uses: ASzc/change-string-case-action@d0603cd0a7dd490be678164909f65c7737470a7f # v6 + with: + string: ${{ env.IMAGE_REGISTRY }} + + - name: Prepare Rechunk run: | sudo apt update && sudo apt install systemd-container sudo podman image scp $(whoami)@localhost::${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} root@localhost:: - sudo podman image ls podman rmi $(podman image ls -qa) --force - name: Rechunk Image @@ -384,9 +391,11 @@ jobs: rechunk: ghcr.io/hhd-dev/rechunk:v0.8.1 ref: ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} skip_compression: 'true' + labels: ${{ steps.meta.outputs.labels }} + prev-ref: ${{ steps.registry_case.outputs.lowercase }}/${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} # Overwrite the image with the chuncked image - - name: Switch Rechunked Image Name + - name: Load Rechunked Image run: | sudo podman rmi $(sudo podman image ls -qa) --force IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }}) @@ -395,18 +404,6 @@ jobs: podman tag $IMAGE ${{ env.IMAGE_NAME }}:${tag} done - - name: Check Pre Rechunk - run: - podman image ls - - # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. - # https://github.com/macbre/push-to-ghcr/issues/12 - - name: Lowercase Registry - id: registry_case - uses: ASzc/change-string-case-action@d0603cd0a7dd490be678164909f65c7737470a7f # v6 - with: - string: ${{ env.IMAGE_REGISTRY }} - # Push the image to GHCR (Image Registry) - name: Push To GHCR uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2 From 8d74b04d6c9bbd7620d21b2ff9a01f35c79e408b Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 26 Sep 2024 01:40:52 +0100 Subject: [PATCH 20/22] chore: enable all the builds, and enable rechunker only in latest --- .github/workflows/build-beta-aurora.yml | 54 ++++++++++----------- .github/workflows/build-beta-bluefin.yml | 54 ++++++++++----------- .github/workflows/build-coreos-aurora.yml | 40 ++++++++-------- .github/workflows/build-coreos-bluefin.yml | 40 ++++++++-------- .github/workflows/build-latest-aurora.yml | 1 + .github/workflows/build-latest-bluefin.yml | 55 +++++++++++----------- .github/workflows/reusable-build.yml | 19 +++++--- 7 files changed, 136 insertions(+), 127 deletions(-) diff --git a/.github/workflows/build-beta-aurora.yml b/.github/workflows/build-beta-aurora.yml index 8cfe1254f27..84d6a68d7aa 100644 --- a/.github/workflows/build-beta-aurora.yml +++ b/.github/workflows/build-beta-aurora.yml @@ -1,28 +1,28 @@ -# name: Aurora Beta -# on: -# # merge_group: -# # pull_request: -# # branches: -# # - main -# # - testing -# # paths-ignore: -# # - "**.md" -# # - "system_files/silverblue/**" -# # push: -# # branches: -# # - main -# # paths-ignore: -# # - "**.md" -# # - "system_files/silverblue/**" -# # schedule: -# # - cron: "40 4 * * *" # 4:40 UTC everyday -# workflow_dispatch: +name: Aurora Beta +on: + # merge_group: + # pull_request: + # branches: + # - main + # - testing + # paths-ignore: + # - "**.md" + # - "system_files/silverblue/**" + # push: + # branches: + # - main + # paths-ignore: + # - "**.md" + # - "system_files/silverblue/**" + # schedule: + # - cron: "40 4 * * *" # 4:40 UTC everyday + workflow_dispatch: -# jobs: -# build: -# name: build -# uses: ./.github/workflows/reusable-build.yml -# secrets: inherit -# with: -# brand_name: aurora -# fedora_version: beta +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: aurora + fedora_version: beta diff --git a/.github/workflows/build-beta-bluefin.yml b/.github/workflows/build-beta-bluefin.yml index 617a4ef2b60..9e20f414a7b 100644 --- a/.github/workflows/build-beta-bluefin.yml +++ b/.github/workflows/build-beta-bluefin.yml @@ -1,28 +1,28 @@ -# name: Bluefin Beta -# on: -# # merge_group: -# # pull_request: -# # branches: -# # - main -# # - testing -# # paths-ignore: -# # - "**.md" -# # - "system_files/silverblue/**" -# # push: -# # branches: -# # - main -# # paths-ignore: -# # - "**.md" -# # - "system_files/silverblue/**" -# # schedule: -# # - cron: "40 4 * * *" # 4:40 UTC everyday -# workflow_dispatch: +name: Bluefin Beta +on: + # merge_group: + # pull_request: + # branches: + # - main + # - testing + # paths-ignore: + # - "**.md" + # - "system_files/silverblue/**" + # push: + # branches: + # - main + # paths-ignore: + # - "**.md" + # - "system_files/silverblue/**" + # schedule: + # - cron: "40 4 * * *" # 4:40 UTC everyday + workflow_dispatch: -# jobs: -# build: -# name: build -# uses: ./.github/workflows/reusable-build.yml -# secrets: inherit -# with: -# brand_name: bluefin -# fedora_version: beta +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: bluefin + fedora_version: beta diff --git a/.github/workflows/build-coreos-aurora.yml b/.github/workflows/build-coreos-aurora.yml index 40422d745d5..8a9093e0791 100644 --- a/.github/workflows/build-coreos-aurora.yml +++ b/.github/workflows/build-coreos-aurora.yml @@ -1,21 +1,21 @@ -# name: Aurora Stable -# on: -# pull_request: -# branches: -# - main -# - testing -# paths-ignore: -# - '**.md' -# - 'system_files/silverblue/**' -# schedule: -# - cron: '41 5 * * 2' # 5:41 UTC every Tuesday -# workflow_dispatch: +name: Aurora Stable +on: + pull_request: + branches: + - main + - testing + paths-ignore: + - '**.md' + - 'system_files/silverblue/**' + schedule: + - cron: '41 5 * * 2' # 5:41 UTC every Tuesday + workflow_dispatch: -# jobs: -# build: -# name: build -# uses: ./.github/workflows/reusable-build.yml -# secrets: inherit -# with: -# brand_name: aurora -# fedora_version: stable +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: aurora + fedora_version: stable diff --git a/.github/workflows/build-coreos-bluefin.yml b/.github/workflows/build-coreos-bluefin.yml index 886c3a38e6f..18d6e80b1d7 100644 --- a/.github/workflows/build-coreos-bluefin.yml +++ b/.github/workflows/build-coreos-bluefin.yml @@ -1,21 +1,21 @@ -# name: Bluefin Stable -# on: -# pull_request: -# branches: -# - main -# - testing -# paths-ignore: -# - '**.md' -# - 'system_files/kinoite/**' -# schedule: -# - cron: '41 5 * * 2' # 5:41 UTC every Tuesday -# workflow_dispatch: +name: Bluefin Stable +on: + pull_request: + branches: + - main + - testing + paths-ignore: + - '**.md' + - 'system_files/kinoite/**' + schedule: + - cron: '41 5 * * 2' # 5:41 UTC every Tuesday + workflow_dispatch: -# jobs: -# build: -# name: build -# uses: ./.github/workflows/reusable-build.yml -# secrets: inherit -# with: -# brand_name: bluefin -# fedora_version: stable +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: bluefin + fedora_version: stable diff --git a/.github/workflows/build-latest-aurora.yml b/.github/workflows/build-latest-aurora.yml index 643c9f83dd9..4a51c0deef0 100644 --- a/.github/workflows/build-latest-aurora.yml +++ b/.github/workflows/build-latest-aurora.yml @@ -26,3 +26,4 @@ jobs: with: brand_name: aurora fedora_version: latest + rechunk: true diff --git a/.github/workflows/build-latest-bluefin.yml b/.github/workflows/build-latest-bluefin.yml index b6fa8db5616..dbbabf58e55 100644 --- a/.github/workflows/build-latest-bluefin.yml +++ b/.github/workflows/build-latest-bluefin.yml @@ -1,28 +1,29 @@ -# name: Bluefin Latest -# on: -# merge_group: -# pull_request: -# branches: -# - main -# - testing -# paths-ignore: -# - '**.md' -# - 'system_files/kinoite/**' -# push: -# branches: -# - main -# paths-ignore: -# - '**.md' -# - 'system_files/kinoite/**' -# schedule: -# - cron: '40 4 * * *' # 4:40 UTC everyday -# workflow_dispatch: +name: Bluefin Latest +on: + merge_group: + pull_request: + branches: + - main + - testing + paths-ignore: + - '**.md' + - 'system_files/kinoite/**' + push: + branches: + - main + paths-ignore: + - '**.md' + - 'system_files/kinoite/**' + schedule: + - cron: '40 4 * * *' # 4:40 UTC everyday + workflow_dispatch: -# jobs: -# build: -# name: build -# uses: ./.github/workflows/reusable-build.yml -# secrets: inherit -# with: -# brand_name: bluefin -# fedora_version: latest +jobs: + build: + name: build + uses: ./.github/workflows/reusable-build.yml + secrets: inherit + with: + brand_name: bluefin + fedora_version: latest + rechunk: true diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index d8aaf7bcd9f..f95a1f15fe0 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -10,6 +10,10 @@ on: description: "'aurora' or 'bluefin'" required: true type: string + rechunk: + description: "Rechunk the image" + required: false + type: boolean outputs: images: description: "An array of images built and pushed to the registry" @@ -33,14 +37,14 @@ jobs: matrix: image_flavor: - main - # - nvidia - # - asus - # - asus-nvidia - # - surface - # - surface-nvidia + - nvidia + - asus + - asus-nvidia + - surface + - surface-nvidia base_name: - ${{ inputs.brand_name }} - # - ${{ inputs.brand_name }}-dx + - ${{ inputs.brand_name }}-dx fedora_version: - ${{ inputs.fedora_version }} exclude: @@ -379,6 +383,7 @@ jobs: string: ${{ env.IMAGE_REGISTRY }} - name: Prepare Rechunk + if: ${{ inputs.rechunk == 'true' }} && ${{ github.event_name != 'pull_request' }} run: | sudo apt update && sudo apt install systemd-container sudo podman image scp $(whoami)@localhost::${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} root@localhost:: @@ -386,6 +391,7 @@ jobs: - name: Rechunk Image id: rechunk + if: ${{ inputs.rechunk == 'true' }} && ${{ github.event_name != 'pull_request' }} uses: hhd-dev/rechunk@v0.8.1 with: rechunk: ghcr.io/hhd-dev/rechunk:v0.8.1 @@ -396,6 +402,7 @@ jobs: # Overwrite the image with the chuncked image - name: Load Rechunked Image + if: ${{ inputs.rechunk == 'true' }} && ${{ github.event_name != 'pull_request' }} run: | sudo podman rmi $(sudo podman image ls -qa) --force IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }}) From f43abe8288777b1a1c15e882734de09fa6d06e4b Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 26 Sep 2024 01:48:44 +0100 Subject: [PATCH 21/22] fix: try to resolve the rechunker conditions --- .github/workflows/reusable-build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index f95a1f15fe0..d10df58f7a3 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -14,6 +14,7 @@ on: description: "Rechunk the image" required: false type: boolean + default: false outputs: images: description: "An array of images built and pushed to the registry" @@ -383,7 +384,7 @@ jobs: string: ${{ env.IMAGE_REGISTRY }} - name: Prepare Rechunk - if: ${{ inputs.rechunk == 'true' }} && ${{ github.event_name != 'pull_request' }} + if: inputs.rechunk == 'true' && github.event_name != 'pull_request' run: | sudo apt update && sudo apt install systemd-container sudo podman image scp $(whoami)@localhost::${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} root@localhost:: @@ -391,7 +392,7 @@ jobs: - name: Rechunk Image id: rechunk - if: ${{ inputs.rechunk == 'true' }} && ${{ github.event_name != 'pull_request' }} + if: inputs.rechunk == 'true' && github.event_name != 'pull_request' uses: hhd-dev/rechunk@v0.8.1 with: rechunk: ghcr.io/hhd-dev/rechunk:v0.8.1 @@ -402,7 +403,7 @@ jobs: # Overwrite the image with the chuncked image - name: Load Rechunked Image - if: ${{ inputs.rechunk == 'true' }} && ${{ github.event_name != 'pull_request' }} + if: inputs.rechunk == 'true' && github.event_name != 'pull_request' run: | sudo podman rmi $(sudo podman image ls -qa) --force IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }}) From 694d6f2af1dac05f46ad9a0bf68e5cfa715adc90 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 26 Sep 2024 14:02:54 +0100 Subject: [PATCH 22/22] chore: update rechunk action to v0.8.6 --- .github/workflows/reusable-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index d10df58f7a3..38e7f55f852 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -178,7 +178,7 @@ jobs: with: containers: ${{ env.AKMODS_FLAVOR }}-kernel:${{ env.kernel_release }} - - name: Verify Kernel Verion Matches + - name: Verify Kernel Version Matches uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0 with: attempt_limit: 3 @@ -393,9 +393,9 @@ jobs: - name: Rechunk Image id: rechunk if: inputs.rechunk == 'true' && github.event_name != 'pull_request' - uses: hhd-dev/rechunk@v0.8.1 + uses: hhd-dev/rechunk@v0.8.6 with: - rechunk: ghcr.io/hhd-dev/rechunk:v0.8.1 + rechunk: ghcr.io/hhd-dev/rechunk:v0.8.6 ref: ${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }} skip_compression: 'true' labels: ${{ steps.meta.outputs.labels }}