Merge pull request #555 from gibmat/add-application-tests #174
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| image-build: | |
| name: Image build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: | |
| - amd64 | |
| - arm64 | |
| timeout-minutes: 60 | |
| runs-on: | |
| - self-hosted | |
| - cpu-4 | |
| - mem-4G | |
| - disk-100G | |
| - arch-${{ matrix.arch }} | |
| - image-debian-13 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: stable | |
| - name: Fix repository permissions | |
| run: | | |
| sudo chown -R $(id -u):$(id -g) . | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get install --yes \ | |
| binutils \ | |
| debian-archive-keyring \ | |
| devscripts \ | |
| libnbd-dev \ | |
| make \ | |
| mtools \ | |
| parted \ | |
| pkgconf \ | |
| pipx \ | |
| qemu-utils \ | |
| yarnpkg | |
| - name: Setup Incus | |
| run: | | |
| curl https://pkgs.zabbly.com/get/incus-daily | sudo sh | |
| sudo chmod 666 /var/lib/incus/unix.socket | |
| incus admin init --auto | |
| - name: Setup mkosi | |
| run: | | |
| pipx install git+https://github.com/systemd/mkosi.git@v25.3 | |
| - name: Load the signing keys | |
| run: | | |
| echo "${{ secrets.SB_CERT }}" > mkosi.crt | |
| chmod 644 mkosi.crt | |
| echo "${{ secrets.SB_KEY }}" > mkosi.key | |
| chmod 600 mkosi.key | |
| mkdir -p certs | |
| cd certs | |
| echo "${{ secrets.SB_EFI }}" | base64 -d | tar zx | |
| cd .. | |
| - name: Build the images | |
| run: | | |
| export PATH="${PATH}:/root/.local/bin" | |
| ( | |
| cat << EOF | |
| #!/bin/sh | |
| echo ${{ github.ref_name }} | |
| EOF | |
| ) > mkosi.version | |
| make build-iso | |
| mkdir upload | |
| ./incus-osd/generate-manifests ./ | |
| mv incus-osd/flasher-tool upload/ | |
| mv mkosi.output/debug.raw upload/ | |
| mv mkosi.output/incus.raw upload/ | |
| mv mkosi.output/incus-ceph.raw upload/ | |
| mv mkosi.output/incus-linstor.raw upload/ | |
| mv mkosi.output/migration-manager.raw upload/ | |
| mv mkosi.output/operations-center.raw upload/ | |
| mv mkosi.output/IncusOS_${{ github.ref_name }}.raw upload/IncusOS_${{ github.ref_name }}.img | |
| mv mkosi.output/IncusOS_${{ github.ref_name }}.iso upload/IncusOS_${{ github.ref_name }}.iso | |
| mv mkosi.output/IncusOS_${{ github.ref_name }}.efi upload/ | |
| mv mkosi.output/IncusOS_${{ github.ref_name }}.usr-*.raw upload/ | |
| - name: Compress the files | |
| run: | | |
| cd upload | |
| for i in *; do | |
| gzip -9 "${i}" | |
| done | |
| - name: Upload binaries as artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: image-${{ matrix.arch }} | |
| path: upload/ |