-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (57 loc) · 1.69 KB
/
build.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
name: build cube image
on:
workflow_dispatch:
repository_dispatch:
push:
branches:
- "main"
# - "<branch>"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: install dependencies
run: |
sudo apt update
sudo apt install coreutils p7zip-full qemu-user-static
- name: checkout CustomPiOS
uses: actions/checkout@v4
with:
fetch-depth: 1
branch: devel
repository: 'guysoft/CustomPiOS'
path: CustomPiOS
- name: checkout repository code
uses: actions/checkout@v4
with:
fetch-depth: 1
path: repository
submodules: true
- name: download raspios lite arm64 image
run: |
cd repository/src/image-raspios_lite_arm64
wget -c --trust-server-names 'https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2024-11-19/2024-11-19-raspios-bookworm-arm64-lite.img.xz'
- name: update CustomPiOS paths
run: |
cd repository/src/image-raspios_lite_arm64
../../../CustomPiOS/src/update-custompios-paths
- name: build image
run: |
sudo modprobe loop
cd repository/src
sudo bash -x ./build_dist raspios_lite_arm64
- name: copy output
id: copy
run: |
source repository/src/config
NOW=$(date +"%Y-%m-%d-%H%M")
IMAGE=$NOW-cube-$DIST_VERSION
cp repository/src/workspace-raspios_lite_arm64/*.img $IMAGE.img
gzip $IMAGE.img
sync; sync; sync
echo "OUTPUT=$IMAGE" >> $GITHUB_ENV
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.OUTPUT }}
path: ${{ env.OUTPUT }}.img.gz