Skip to content

audit: fix sysdata path, verify layer digests, drop legacy alias #492

audit: fix sysdata path, verify layer digests, drop legacy alias

audit: fix sysdata path, verify layer digests, drop legacy alias #492

Workflow file for this run

name: Build rootfs
on:
workflow_dispatch:
inputs:
distributions:
description: >
Space-separated list of distributions to build.
Available: alpine archlinuxarm debian fedora rocky ubuntu
required: true
type: string
push:
paths:
- 'build-recipes/**.yaml'
jobs:
prepare:
name: Determine distributions
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set build matrix
id: set-matrix
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
DISTROS="${{ inputs.distributions }}"
elif [ "${{ github.event.before }}" = "0000000000000000000000000000000000000000" ]; then
# First push to branch — build everything
DISTROS=$(ls build-recipes/*.yaml | xargs -I{} basename {} .yaml | tr '\n' ' ')
else
DISTROS=$(git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" \
-- 'build-recipes/*.yaml' \
| sed 's|build-recipes/||; s|\.yaml$||' \
| tr '\n' ' ')
fi
JSON=$(printf '%s\n' $DISTROS | grep -v '^$' | jq -R . | jq -sc .)
echo "matrix={\"distro\":$JSON}" >> "$GITHUB_OUTPUT"
echo "Will build: $DISTROS"
build:
name: Build ${{ matrix.distro }}
needs: prepare
if: needs.prepare.outputs.matrix != '{"distro":[]}'
runs-on: ubuntu-24.04
strategy:
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
fail-fast: false
steps:
- uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update -q
sudo apt-get install -yq qemu-user-static binfmt-support
curl -L -o /tmp/mmdebstrap.deb http://ftp.us.debian.org/debian/pool/main/m/mmdebstrap/mmdebstrap_1.5.7-3_all.deb
sudo apt install -yq /tmp/mmdebstrap.deb
- name: Install keyrings
run: |
curl -L -o /tmp/keyring.deb http://ftp.us.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2025.1_all.deb
sudo apt install -yq /tmp/keyring.deb
- name: Install Python dependencies
run: pip install pyyaml
- name: Build ${{ matrix.distro }} rootfs
run: |
mkdir -p rootfs
sudo python3 bootstrap-rootfs.py build-recipes/${{ matrix.distro }}.yaml -o rootfs
- name: Upload rootfs artifacts
uses: actions/upload-artifact@v7
with:
name: rootfs-${{ matrix.distro }}
path: rootfs/
if-no-files-found: error