-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 2.18 KB
/
main.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
name: Build Pi-DJ OS
on:
push:
branches:
- main
- arm-runner
pull_request:
paths:
- "**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: pguyot/arm-runner-action@v2
id: build_image
with:
base_image: dietpi:rpi_armv8_bullseye
cpu: cortex-a53
commands: |
set +x
echo
echo ">--------------------------------------------------------------------------------------------------<"
echo "> Building Pi-DJ "
echo ">--------------------------------------------------------------------------------------------------<"
echo
./dietpi/build.sh
echo
echo ">--------------------------------------------------------------------------------------------------<"
echo "> Done! "
echo ">--------------------------------------------------------------------------------------------------<"
echo
- name: Compress the release image
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/arm-runner'
run: |
mv ${{ steps.build_image.outputs.image }} pi-dj-${{ github.ref_name }}.img
xz -0 -T 0 -v pi-dj-${{ github.ref_name }}.img
- name: Upload release image
uses: actions/upload-artifact@v2
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/arm-runner'
with:
name: pi-dj-${{ github.ref_name }}.img.xz
path: pi-dj-${{ github.ref_name }}.img.xz
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
with:
draft: github.ref == 'refs/heads/main'
prerelease: true
# body: "" # TODO
files: |
# TODO: update files after building
Release.txt
LICENSE