From f4990196e52dba912e997eb0d53303c36dccd451 Mon Sep 17 00:00:00 2001 From: truxnell <19149206+truxnell@users.noreply.github.com> Date: Tue, 19 Mar 2024 08:02:42 +1100 Subject: [PATCH] feat: image builder action trial --- .github/lint/workflows/build-raspi4.yaml | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/lint/workflows/build-raspi4.yaml diff --git a/.github/lint/workflows/build-raspi4.yaml b/.github/lint/workflows/build-raspi4.yaml new file mode 100644 index 0000000..c0bbc56 --- /dev/null +++ b/.github/lint/workflows/build-raspi4.yaml @@ -0,0 +1,32 @@ +--- +name: sd-image-rpi4 +on: + workflow_dispatch: + +jobs: + build-sd-image: + name: Build Raspi4 image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + - uses: cachix/install-nix-action@v23 + with: + nix_path: nixpkgs=channel:nixos-23.05 + extra_nix_config: | + extra-platforms = aarch64-linux + - name: Check nix.conf + run: cat /etc/nix/nix.conf + - name: Register binfmt + run: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - name: Test binfmt availability + run: | + cat /proc/sys/fs/binfmt_misc/qemu-aarch64 + shell: bash + - name: Build SD Image + run: | + nix build .#image.rip4 + - uses: actions/upload-artifact@v3 + with: + name: rpi4.img + path: ./result/sd-image/*.img*