-
-
Notifications
You must be signed in to change notification settings - Fork 111
68 lines (65 loc) · 1.83 KB
/
nightly-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
67
68
name: Nightly Build
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '14 0 * * *' # runs daily at 00:14
jobs:
nightly-detect:
runs-on: ubuntu-latest
outputs:
new-commits: ${{ steps.count-commits.outputs.count }}
steps:
- uses: actions/checkout@v4
with:
ref: 'community'
fetch-depth: 0 # Required to count the commits
- name: Get new commits
id: count-commits
run: |
count=$(git log --oneline --since '24 hours ago' | wc -l)
echo "Saw $count commits"
echo "count=$count" >> $GITHUB_OUTPUT
nightly-build:
uses: ./.github/workflows/build.yml
needs: nightly-detect
if: needs.nightly-detect.outputs.new-commits > 0
with:
firmware-retention-days: 30
build-type: 'Release'
build-tag: 'nightly'
branch: 'community'
nightly-publish:
uses: ./.github/workflows/publish.yml
needs: nightly-build
with:
tag: 'nightly'
beta-detect:
runs-on: ubuntu-latest
outputs:
new-commits: ${{ steps.count-commits.outputs.count }}
steps:
- uses: actions/checkout@v4
with:
ref: 'release/1.2'
fetch-depth: 0 # Required to count the commits
- name: Get new commits
id: count-commits
run: |
count=$(git log --oneline --since '24 hours ago' | wc -l)
echo "Saw $count commits"
echo "count=$count" >> $GITHUB_OUTPUT
beta-build:
uses: ./.github/workflows/build.yml
needs: beta-detect
if: needs.beta-detect.outputs.new-commits > 0
with:
firmware-retention-days: 30
build-type: 'Release'
build-tag: 'beta'
branch: 'release/1.2'
beta-publish:
uses: ./.github/workflows/publish.yml
needs: beta-build
with:
tag: 'beta'
branch: 'release/1.2'