-
Notifications
You must be signed in to change notification settings - Fork 15
105 lines (99 loc) · 2.92 KB
/
ci.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
name: Build Release
on:
push:
tags:
- 'v*.*.*'
# Allow manual triggering of action
workflow_dispatch:
jobs:
create_image_RPI1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
id: caching
with:
path: output/raspberrypi/images/
key: photos-RPI1-${{ github.sha }}
- name: Build RPI1 image
if: steps.caching.outputs.cache-hit != 'true'
run: |
./build.sh raspberrypi
./build.sh raspberrypi mkrelease
create_image_RPI2:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
id: caching
with:
path: output/raspberrypi2/images/
key: photos-RPI2-${{ github.sha }}
- name: Build RPI2 image
if: steps.caching.outputs.cache-hit != 'true'
run: |
./build.sh raspberrypi2
./build.sh raspberrypi2 mkrelease
create_image_RPI3:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
id: caching
with:
path: output/raspberrypi3/images/
key: photos-RPI3-${{ github.sha }}
- name: Build RPI3 image
if: steps.caching.outputs.cache-hit != 'true'
run: |
./build.sh raspberrypi3
./build.sh raspberrypi3 mkrelease
create_image_RPI4:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
id: caching
with:
path: output/raspberrypi4/images/
key: photos-RPI4-${{ github.sha }}
- name: Build RPI4 image
if: steps.caching.outputs.cache-hit != 'true'
run: |
./build.sh raspberrypi4
./build.sh raspberrypi4 mkrelease
create_Release:
needs: [ create_image_RPI1, create_image_RPI2, create_image_RPI3, create_image_RPI4 ]
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: output/raspberrypi/images/
key: photos-RPI1-${{ github.sha }}
- uses: actions/cache@v2
with:
path: output/raspberrypi2/images/
key: photos-RPI2-${{ github.sha }}
- uses: actions/cache@v2
with:
path: output/raspberrypi3/images/
key: photos-RPI3-${{ github.sha }}
- uses: actions/cache@v2
with:
path: output/raspberrypi4/images/
key: photos-RPI4-${{ github.sha }}
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
output/raspberrypi/images/*.img.xz
output/raspberrypi2/images/*.img.xz
output/raspberrypi3/images/*.img.xz
output/raspberrypi4/images/*.img.xz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}