Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rechunk images into smaller parts #1687

Merged
merged 24 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
97f6a32
feat: rechunk images into smaller parts
p5 Sep 19, 2024
d868f30
Merge branch 'main' of github.com:ublue-os/bluefin into rechunker
p5 Sep 19, 2024
d673936
chore: temporarily disable unwanted builds
p5 Sep 19, 2024
5b51849
fix: use master branch of rechunk action
p5 Sep 19, 2024
d8d24c4
fix: properly set tag
p5 Sep 19, 2024
0a61c9a
fix: read default tag from environment variables
p5 Sep 19, 2024
43083d8
fix: load rechunked image after build
p5 Sep 19, 2024
336e298
chore: move image to :latest tag before rechunk
p5 Sep 25, 2024
2d2aff4
Merge branch 'main' of github.com:ublue-os/bluefin into rechunker
p5 Sep 25, 2024
d9f0370
fix: correctly use multi-line script
p5 Sep 25, 2024
65f4fea
fix: reference localhost image
p5 Sep 25, 2024
1adcc0f
chore: use release version
p5 Sep 25, 2024
7e5e6ce
chore: remove localhost from rechunk ref
p5 Sep 25, 2024
56f351b
fix: reference localhost image
p5 Sep 25, 2024
32367ee
fix: switch image to rootful podman before rechunk
p5 Sep 25, 2024
f39fd45
fix: install machinectl
p5 Sep 25, 2024
607bf8e
fix: use ::
p5 Sep 25, 2024
daa4d18
chore: remove codeql from builder
p5 Sep 25, 2024
b35777f
chore: remove all Podman images from rootful and rootless
p5 Sep 25, 2024
4fe8de5
fix: actually enable the maximize-build action
p5 Sep 25, 2024
f9a4173
feat: add image labels, rename steps and use previous image ref when …
p5 Sep 26, 2024
8d74b04
chore: enable all the builds, and enable rechunker only in latest
p5 Sep 26, 2024
f43abe8
fix: try to resolve the rechunker conditions
p5 Sep 26, 2024
694d6f2
chore: update rechunk action to v0.8.6
p5 Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-latest-aurora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ jobs:
with:
brand_name: aurora
fedora_version: latest
rechunk: true
1 change: 1 addition & 0 deletions .github/workflows/build-latest-bluefin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ jobs:
with:
brand_name: bluefin
fedora_version: latest
rechunk: true
39 changes: 37 additions & 2 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
description: "'aurora' or 'bluefin'"
required: true
type: string
rechunk:
description: "Rechunk the image"
required: false
type: boolean
default: false
outputs:
images:
description: "An array of images built and pushed to the registry"
Expand Down Expand Up @@ -173,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
Expand All @@ -189,8 +194,9 @@ 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

- name: Check just syntax
uses: ublue-os/just-action@bda593098a84a84973b002b4377709166a68be52 # v2
Expand Down Expand Up @@ -377,6 +383,35 @@ jobs:
with:
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::
podman rmi $(podman image ls -qa) --force

- name: Rechunk Image
id: rechunk
if: inputs.rechunk == 'true' && github.event_name != 'pull_request'
uses: hhd-dev/[email protected]
with:
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 }}
prev-ref: ${{ steps.registry_case.outputs.lowercase }}/${{ steps.build_image.outputs.image }}:${{ env.DEFAULT_TAG }}

# 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 }})
sudo rm -rf ${{ steps.rechunk.outputs.output }}
for tag in ${{ steps.build_image.outputs.tags }}; do
podman tag $IMAGE ${{ env.IMAGE_NAME }}:${tag}
done

# Push the image to GHCR (Image Registry)
- name: Push To GHCR
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2
Expand Down
Loading