Skip to content

Commit 7b9aa6e

Browse files
committed
init test for workflow
1 parent 28b341b commit 7b9aa6e

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "Build"
2+
on:
3+
repository_dispatch:
4+
workflow_dispatch:
5+
inputs:
6+
release:
7+
description: "release"
8+
required: true
9+
type: string
10+
11+
env:
12+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
13+
14+
jobs:
15+
release:
16+
name: Create Release
17+
runs-on: ubuntu-latest
18+
permissions: write-all
19+
steps:
20+
- name: Create new release
21+
- run: |
22+
if ! gh release view ${{ inputs.release }}; then
23+
gh release create ${{ inputs.release }} --title ${{ inputs.release }}
24+
fi
25+
26+
images:
27+
needs: release
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
device:
32+
- hinlink-h88k
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: docker/setup-qemu-action@v3
37+
- uses: cachix/install-nix-action@v31
38+
with:
39+
enable_kvm: true
40+
extra_nix_config: |
41+
extra-platforms = aarch64-linux i686-linux
42+
experimental-features = nix-command flakes
43+
system-features = nixos-test benchmark big-parallel kvm
44+
trusted-public-keys = cache.qbisi.cc-1:xEChzP5k8fj+7wajY+e9IDORRTGMhViP5NaqMShGGjQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
45+
substituters = https://cache.qbisi.cc https://cache.nixos.org/
46+
- name: Set Swap Space
47+
uses: pierotofy/set-swap-space@master
48+
with:
49+
swap-size-gb: 32
50+
- name: Build image
51+
run: nix build .#images.nixos-${{ matrix.device }}
52+
- name: Upload
53+
run: gh release upload ${{ inputs.release }} result/*

0 commit comments

Comments
 (0)