31 lines
1,007 B
YAML
31 lines
1,007 B
YAML
name: Build Pi NixOS Image
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'pi-imgs/**'
|
|
- '.gitea/workflows/build-pi-img.yml'
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: debian-latest-arm
|
|
steps:
|
|
- name: Checkout code
|
|
uses: https://github.com/RouxAntoine/checkout@v3.5.4
|
|
with:
|
|
ref: trunk
|
|
- name: Install prerequisites
|
|
run: apt update && apt install -y sudo
|
|
- name: Install Nix
|
|
uses: https://github.com/cachix/install-nix-action@v22
|
|
with:
|
|
extra_nix_config: "experimental-features = nix-command flakes"
|
|
nix_path: nixpkgs=channel:nixos-23.05
|
|
- name: Remove access_tokens
|
|
run: sed -i '/^access-tokens/d' /etc/nix/nix.conf
|
|
- name: Build image
|
|
run: nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage -I nixos-config=./pi-imgs/pi-initial.nix --argstr system aarch64-linux
|
|
- uses: https://github.com/actions/upload-artifact@v2
|
|
with:
|
|
name: custom-pi-img
|
|
path: result/sd-image/*.img
|