mirror of
https://github.com/sstent/NixOS_ARM_SDImages.git
synced 2025-12-06 06:01:42 +00:00
47 lines
1.6 KiB
YAML
47 lines
1.6 KiB
YAML
name: Build OS Image - AARCH64
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-default-image:
|
|
name: Build OS image - AARCH64
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v23
|
|
#uses: DeterminateSystems/nix-installer-action@v4
|
|
with:
|
|
# Pin because the latest all-hardware profile changes
|
|
# https://github.com/NixOS/nixpkgs/pull/128532
|
|
#nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/c23146505c35a07bafbecf36af4f9ebde2bb7dfd.tar.gz
|
|
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/release-23.05.tar.gz
|
|
extra_nix_config: |
|
|
extra-platforms = aarch64-linux
|
|
- name: Run the Magic Nix Cache
|
|
uses: DeterminateSystems/magic-nix-cache-action@v2
|
|
|
|
- name: Show nixpkgs version
|
|
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
|
|
|
- run: |
|
|
sudo apt -y install qemu-user-static
|
|
|
|
- name: Test binfmt
|
|
run: |
|
|
cat /proc/sys/fs/binfmt_misc/qemu-aarch64
|
|
/usr/bin/qemu-aarch64-static --version
|
|
|
|
- name: Build SD Image
|
|
run: |
|
|
nix-build '<nixpkgs/nixos>' \
|
|
-A config.system.build.sdImage \
|
|
-I nixpkgs=https://github.com/NixOS/nixpkgs/archive/c23146505c35a07bafbecf36af4f9ebde2bb7dfd.tar.gz \
|
|
-I nixos-config=./sd-image_aarch64.nix \
|
|
--argstr system aarch64-linux
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: sd-image_aarch64.img
|
|
path: ./result/sd-image/*.img*
|