-
Notifications
You must be signed in to change notification settings - Fork 12
106 lines (103 loc) · 3.3 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
106
name: Lygisk CI
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
concurrency:
group: lygisk-ci
cancel-in-progress: false
jobs:
automerge-stable:
uses: ./.github/workflows/automerge.yml
with:
branch: stable
automerge-beta:
uses: ./.github/workflows/automerge.yml
with:
branch: beta
automerge-canary:
uses: ./.github/workflows/automerge.yml
with:
branch: canary
automerge-madness:
uses: ./.github/workflows/automerge.yml
with:
branch: madness
build-stable:
needs: automerge-stable
if: needs.automerge-stable.outputs.changed == 'true'
uses: ./.github/workflows/build.yml
with:
branch: stable
secrets:
KEYSTORE: ${{ secrets.KEYSTORE }}
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }}
build-beta:
needs: automerge-beta
if: needs.automerge-beta.outputs.changed == 'true'
uses: ./.github/workflows/build.yml
with:
branch: beta
secrets:
KEYSTORE: ${{ secrets.KEYSTORE }}
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }}
build-canary:
needs: automerge-canary
if: needs.automerge-canary.outputs.changed == 'true'
uses: ./.github/workflows/build.yml
with:
branch: canary
secrets:
KEYSTORE: ${{ secrets.KEYSTORE }}
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }}
build-madness:
needs: automerge-madness
if: needs.automerge-madness.outputs.changed == 'true'
uses: ./.github/workflows/build.yml
with:
branch: madness
secrets:
KEYSTORE: ${{ secrets.KEYSTORE }}
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }}
deploy:
if: always()
needs: [
build-stable, build-beta, build-canary, build-madness,
automerge-stable, automerge-beta, automerge-canary, automerge-madness
]
runs-on: ubuntu-latest
strategy:
matrix:
branch: [ stable, beta, canary, madness ]
fail-fast: false
max-parallel: 1
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/deploy
if: needs[format('automerge-{0}', matrix.branch)].outputs.changed == 'true'
with:
branch: ${{ matrix.branch }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
if: needs[format('automerge-{0}', matrix.branch)].outputs.changed == 'true'
with:
ref: ci-build-${{ matrix.branch }}
fetch-depth: 0
- name: Setup git
if: needs[format('automerge-{0}', matrix.branch)].outputs.changed == 'true'
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Update CI master sha
if: needs[format('automerge-{0}', matrix.branch)].outputs.changed == 'true'
run: |
echo "${{ needs[format('automerge-{0}', matrix.branch)].outputs.basesha }}" > ci-master-sha.txt
git add ci-master-sha.txt
git commit -m "save master base commit sha"
- name: Push result
if: needs[format('automerge-{0}', matrix.branch)].outputs.changed == 'true'
uses: ad-m/[email protected]
with:
force_with_lease: true
- uses: actions/checkout@v4
# need to checkout default branch again, for the post-run hooks of the composite deploy action to work