Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

Build Custom Image

Build Custom Image #52

Workflow file for this run

name: Build Custom Image
on:
schedule:
- cron:
"00 06 * * *" # build at 06:00 UTC every day
# (20 minutes after last ublue images start building)
push:
paths-ignore: # don't rebuild if only documentation has changed
- "**.md"
workflow_dispatch: # allow manually triggering builds
concurrency:
# only run one build at a time
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
bluebuild:
name: Build Custom Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false
matrix:
recipe:
# !! Add your recipes here
- recipe-main.yml
- recipe-nvidia.yml
steps:
# taken from secureblue, might speedup maximizing build disk space!
# https://github.com/secureblue/secureblue/blob/aad24ddb05fe8b390919beb7f536d0b749f7244b/.github/workflows/build-one-recipe.yml#L44-L50
- name: Optimize build times
shell: bash
run: |
echo 'set man-db/auto-update false' | sudo debconf-communicate
sudo dpkg-reconfigure man-db
sudo rm -f /var/lib/man-db/auto-update
sudo sed -i 's/^update_initramfs=.*/update_initramfs=no/' /etc/initramfs-tools/update-initramfs.conf
# faster alternative method for maximizing build disk space, thanks secureblue!
# https://github.com/secureblue/secureblue/blob/aad24ddb05fe8b390919beb7f536d0b749f7244b/.github/workflows/build-one-recipe.yml#L52
- name: Free disk space
shell: bash
run: |
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /opt/ghc || true
sudo rm -rf /usr/local/.ghcup || true
sudo docker image prune --all --force || true
sudo swapoff -a || true
sudo rm -f /mnt/swapfile || true
# the build is fully handled by the reusable github action
- name: Build Custom Image
uses: blue-build/github-action@v1.9
with:
recipe: ${{ matrix.recipe }}
cosign_private_key: ${{ secrets.SIGNING_SECRET }}
registry_token: ${{ github.token }}
pr_event_number: ${{ github.event.number }}
# enabled by default, disable if your image is small and you want faster builds
maximize_build_space: false
squash: true