-
Notifications
You must be signed in to change notification settings - Fork 20
141 lines (116 loc) · 3.33 KB
/
hrmpf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Build void images
on:
workflow_dispatch:
inputs:
archs:
description: "Archs to build for"
default: "x86_64 aarch64"
required: false
type: string
platforms:
description: "aarch64 platforms to include support for"
default: "pinebookpro x13s"
required: false
type: string
extra_args:
description: "Extra arguments"
default: ""
required: false
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
prepare:
name: Prepare Environment
runs-on: ubuntu-latest
outputs:
archs: ${{ steps.prep.outputs.archs }}
steps:
- name: Prepare Environment
id: prep
run: |
jsonify() {
sed 's/\s\+/ /g' | jq -Rrc 'split(" ")'
}
echo "archs=$(echo "${{ inputs.archs }}" | jsonify)" >> $GITHUB_OUTPUT
build-hrmpf:
name: Build Hrmpf ISOs
runs-on: ubuntu-latest
needs: prepare
strategy:
matrix:
arch: ${{ fromJson(needs.prepare.outputs.archs) }}
container:
image: 'ghcr.io/void-linux/void-mklive:20250116R1'
options: --privileged
volumes:
- /dev:/dev
env:
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
shell: sh
run: xbps-install -Syu xbps && xbps-install -yu
- name: Clone and checkout
uses: classabbyamp/treeless-checkout-action@v1
- name: Build Hrmpf ISOs
run: |
./mkhrmpf.sh -a "${{ matrix.arch }}" -- -P "${{ inputs.platforms }}" ${{ inputs.extra_args }}
- name: Prepare artifacts for upload
run: |
mkdir -p distdir
mv hrmpf*.iso distdir
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: hrmpf-${{ matrix.arch }}
path: |
distdir/*
if-no-files-found: error
merge-artifacts:
name: Combine artifacts
runs-on: ubuntu-latest
needs:
- prepare
- build-hrmpf
container:
image: 'ghcr.io/void-linux/void-mklive:20250116R1'
env:
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
shell: sh
run: xbps-install -Syu xbps && xbps-install -yu
- name: Clone and checkout
uses: classabbyamp/treeless-checkout-action@v1
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: distdir
merge-multiple: true
- name: Prepare artifacts for upload
run: |
cd distdir && sha256 * > sha256sum.txt
- name: Upload artifacts
id: upload
uses: actions/upload-artifact@v4
with:
name: hrmpf
path: |
distdir/*
if-no-files-found: error
- name: Generate summary
run: |
cat << EOF >> "$GITHUB_STEP_SUMMARY"
## Images generated successfully!
### Download
Download the result of this run from [this url](${{ steps.upload.outputs.artifact-url }}).
### Checksums
\`\`\`
$(cat distdir/sha256sum.txt)
\`\`\`
EOF