From 115a768329be364fc8fd6c8b8a12f8eb13c05fa6 Mon Sep 17 00:00:00 2001 From: osbm Date: Wed, 15 Jan 2025 20:33:39 +0300 Subject: [PATCH] add sd image builder --- .github/workflows/build-sd-image.yml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/build-sd-image.yml diff --git a/.github/workflows/build-sd-image.yml b/.github/workflows/build-sd-image.yml new file mode 100644 index 0000000..ec45caa --- /dev/null +++ b/.github/workflows/build-sd-image.yml @@ -0,0 +1,29 @@ +name: Build SD image for Raspberry Pi 5 + +on: + workflow_dispatch: + +jobs: + build-sd-image: + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install Nix + uses: cachix/install-nix-action@v16 + + - name: Build SD image + run: nix build -L '.#nixosConfigurations.pochita-sd.config.system.build.sdImage + + - name: Zip the Resulting SD image + run: | + mkdir -p sd-image + cp -r result/* sd-image + zip -r sd-image.zip sd-image + + - name: Upload SD image + uses: actions/upload-artifact@v2 + with: + name: sd-image +