This repository has been archived on 2024-07-08. You can view files and clone it, but cannot push or open issues or pull requests.
nix-config-tn/.github/workflows/build-raspi4.yaml
renovate[bot] 0525b5b195 ci(github-action)!: Update actions/upload-artifact action to v4 (#15)
| datasource  | package                 | from | to |
| ----------- | ----------------------- | ---- | -- |
| github-tags | actions/upload-artifact | v3   | v4 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-26 12:46:11 +00:00

38 lines
1 KiB
YAML

---
name: build-image
on:
workflow_dispatch:
inputs:
image:
description: 'Which image to build'
required: true
default: 'rpi4'
options: ['iso', 'rpi4']
jobs:
build-sd-image:
name: Build Nixos image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: cachix/install-nix-action@v26
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 .#images.${{ github.event.inputs.image }}
- uses: actions/upload-artifact@v4
with:
name: rpi4.img
path: ./result/sd-image/*.img*