Check out Rechunker

This commit is contained in:
2025-11-02 18:05:02 +09:00
parent dc7950a1ec
commit f1c09b70b4

View File

@@ -50,16 +50,6 @@ jobs:
echo "IMAGE_REGISTRY=${IMAGE_REGISTRY,,}" >> ${GITHUB_ENV}
echo "IMAGE_NAME=${IMAGE_NAME,,}" >> ${GITHUB_ENV}
# Pre-create Podman's auth file directory and file, this is somehow needed here.
#mkdir -p /tmp/podman-run-0/containers
#echo "{}" > /tmp/podman-run-0/containers/auth.json
# Pre-create docker config file
#mkdir -p ~/.docker
#echo "{}" > ~/.docker/config.json
#touch /tmp/podman-run-0/containers/auth.json
# These stage versions are pinned by https://github.com/renovatebot/renovate
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
@@ -83,10 +73,10 @@ jobs:
with:
# This generates all the tags for your image, you can add custom tags here too!
tags: |
type=sha
type=raw,value=latest,enable=${{ github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=${{ env.FEDORA_BASE }},enable=${{ github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=raw,value=${{ env.FEDORA_BASE }}-{{date 'YYYYMMDD'}},enable=${{ github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=sha,enable=${{ github.event_name == 'pull_request' }}
type=ref,event=pr
labels: |
io.artifacthub.package.readme-url=${{ env.README_URL }}
@@ -125,6 +115,23 @@ jobs:
extra-args: --isolation=chroot
oci: false
# Rechunk is a script that we use on Universal Blue to make sure there isnt a single huge layer when your image gets published.
# This does not make your image faster to download, just provides better resumability and fixes a few errors.
# Documentation for Rechunk is provided on their github repository at https://github.com/hhd-dev/rechunk
# You can enable it by uncommenting the following lines:
- name: Run Rechunker
id: rechunk
uses: hhd-dev/rechunk@v1.2.4
with:
rechunk: "ghcr.io/hhd-dev/rechunk:v1.2.4"
ref: "localhost/${{ env.IMAGE_NAME }}:${{ env.FEDORA_BASE }}-"
prev-ref:
"${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.FEDORA_BASE
}}"
skip_compression: true
version: ${{ env.FEDORA_BASE }}
labels: ${{ steps.metadata.outputs.labels }} # Rechunk strips out all the labels during build, this needs to be reapplied here with newline separator
# Rechunk is a script that we use on Universal Blue to make sure there isnt a single huge layer when your image gets published.
# This does not make your image faster to download, just provides better resumability and fixes a few errors.
# Documentation for Rechunk is provided on their github repository at https://github.com/hhd-dev/rechunk