mirror of
https://github.com/sstent/nixos-on-odroid-m1.git
synced 2026-01-25 14:42:08 +00:00
72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
name: Build OS Image
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- '*'
|
|
- '.github/workflows/BuildSDImage.yml'
|
|
jobs:
|
|
build-default-image:
|
|
name: Build OS image
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
- name: Install Nix
|
|
uses: DeterminateSystems/nix-installer-action@v4
|
|
with:
|
|
extra_nix_config: |
|
|
extra-platforms = aarch64-linux
|
|
|
|
- name: Run the Magic Nix Cache
|
|
uses: DeterminateSystems/magic-nix-cache-action@v2
|
|
|
|
|
|
- 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 --show-trace --option system aarch64-linux --option sandbox false .#images.m1
|
|
ls -lah ./result/sd-image
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: sd-image-ARM64_img
|
|
path: ./result/sd-image/*.img*
|
|
|
|
# - name: Download artifact # yes, this is really necessary
|
|
# uses: actions/download-artifact@v2
|
|
# with:
|
|
# name: sd-image-ARM64_img
|
|
# path: release-files
|
|
|
|
# - name: Display structure of downloaded files
|
|
# run: ls -lah
|
|
# working-directory: release-files
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: Latest_ARM64
|
|
body: Auto-generated image build
|
|
prerelease: true
|
|
files: ./result/sd-image/*.img*
|
|
|
|
|
|
# - uses: "marvinpinto/action-automatic-releases@latest"
|
|
# with:
|
|
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
# automatic_release_tag: "latest"
|
|
# prerelease: true
|
|
# title: "Image Build - ARM64"
|
|
# files: |
|
|
# ./result/sd-image/*.img*
|