-
Notifications
You must be signed in to change notification settings - Fork 182
235 lines (223 loc) · 6.99 KB
/
all.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
name: Build and Distribute Sofia-Sip
on:
push:
branches: [ master ]
paths:
- "**"
- "!debian/changelog"
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.ref }}
jobs:
sofia_build_rpm:
name: 'Build RPM'
uses: s3rj1k/actions-template/.github/workflows/ci-rpm-packages.yml@cicd
with:
PROJECT_NAME: sofia-sip
RUNNER: ubuntu-latest
PACKAGER: 'packager Andrey Volk <[email protected]>'
PLATFORM: amd64
secrets: inherit
sofia_build_deb:
name: 'Build DEB'
uses: s3rj1k/actions-template/.github/workflows/ci-deb-packages-v2.yml@cicd
strategy:
fail-fast: false
matrix:
codename:
- bookworm
- bullseye
- buster
- stretch
platform:
- amd64
- armhf
with:
PROJECT_NAME: sofia-sip
RUNNER: ubuntu-latest
BASE_IMAGE: signalwire/build-deb-action
DISTRO_CODENAME: ${{ matrix.codename }}
PLATFORM: ${{ matrix.platform }}
generate_meta_rpm:
name: 'Meta RPM'
needs: [ sofia_build_rpm ]
strategy:
matrix:
os:
- rpm
platform:
- amd64
uses: s3rj1k/actions-template/.github/workflows/ci-libs-metadata-v2.yml@cicd
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-artifact
OS_PLATFORM: ${{ matrix.os }}-${{ matrix.platform }}
RUNNER: ubuntu-latest
FILE_PATH_PREFIX: /var/www/sofia-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}
generate_meta_deb:
name: 'Meta DEB'
needs: [ sofia_build_deb ]
strategy:
matrix:
os:
- deb
codename:
- bookworm
- bullseye
- buster
- stretch
platform:
- amd64
- armhf
uses: s3rj1k/actions-template/.github/workflows/ci-libs-metadata-v2.yml@cicd
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-artifact
OS_PLATFORM: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}
RUNNER: ubuntu-latest
FILE_PATH_PREFIX: /var/www/sofia-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}
distribute_matrix_rpm:
permissions: write-all
name: 'Copy to remote RPM'
needs: [ sofia_build_rpm ]
strategy:
matrix:
os:
- rpm
platform:
- amd64
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@cicd
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-artifact
TARGET_FOLDER: /var/www/sofia-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}
RUNNER: ubuntu-latest
FILES: '*.tar.gz'
CREATE_DESTINATION_FOLDERS: true
secrets:
# Explicit define secrets for better understanding but it could be just inherit
PROXY_URL: ${{ secrets.PROXY_URL }}
USERNAME: ${{ secrets.USERNAME }}
HOSTNAME: ${{ secrets.HOSTNAME }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}
distribute_matrix_deb:
permissions: write-all
name: 'Copy to remote DEB'
needs: [ sofia_build_deb ]
strategy:
matrix:
os:
- deb
codename:
- bookworm
- bullseye
- buster
- stretch
platform:
- amd64
- armhf
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@cicd
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-artifact
TARGET_FOLDER: /var/www/sofia-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}
RUNNER: ubuntu-latest
FILES: '*.tar.gz'
CREATE_DESTINATION_FOLDERS: true
secrets:
# Explicit define secrets for better understanding but it could be just inherit
PROXY_URL: ${{ secrets.PROXY_URL }}
USERNAME: ${{ secrets.USERNAME }}
HOSTNAME: ${{ secrets.HOSTNAME }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}
distribute_meta_rpm:
permissions: write-all
name: 'Copy meta to remote RPM'
needs: [ generate_meta_rpm ]
strategy:
max-parallel: 1
matrix:
os:
- rpm
platform:
- amd64
uses: s3rj1k/actions-template/.github/workflows/cd-libs-metadata.yml@cicd
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.platform }}-meta
LIB_NAME: sofia-sip
TARGET_OS: ${{ matrix.os }}
TARGET_PLATFORM: ${{ matrix.platform }}
RUNNER: ubuntu-latest
TARGET_REPO: signalwire/bamboo_gha_trigger
secrets:
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}
concurrency:
group: sofia-sip-${{ matrix.os }}-${{ matrix.platform }}
cancel-in-progress: false
distribute_meta_deb:
permissions: write-all
name: 'Copy meta to remote DEB'
needs: [ generate_meta_deb ]
strategy:
max-parallel: 1
matrix:
os:
- deb
codename:
- bookworm
- bullseye
- buster
- stretch
platform:
- amd64
- armhf
uses: s3rj1k/actions-template/.github/workflows/cd-libs-metadata.yml@cicd
with:
ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.codename }}-${{ matrix.platform }}-meta
LIB_NAME: sofia-sip
TARGET_OS: ${{ matrix.os }}
TARGET_PLATFORM: ${{ matrix.platform }}
RUNNER: ubuntu-latest
TARGET_REPO: signalwire/bamboo_gha_trigger
secrets:
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}
concurrency:
group: sofia-sip-${{ matrix.os }}-${{ matrix.platform }}
cancel-in-progress: true
distribute_hash_rpm:
permissions: write-all
name: 'Copy hash to remote RPM'
needs: [ distribute_meta_rpm ]
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@cicd
strategy:
matrix:
os:
- rpm
platform:
- amd64
with:
RUNNER: ubuntu-latest
CREATE_DESTINATION_FOLDERS: false
EXEC_COMMANDS: 'echo "${{ github.sha }}" > /var/www/sofia-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}/hash.txt'
secrets:
PROXY_URL: ${{ secrets.PROXY_URL }}
USERNAME: ${{ secrets.USERNAME }}
HOSTNAME: ${{ secrets.HOSTNAME }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}
distribute_hash_deb:
permissions: write-all
name: 'Copy hash to remote DEB'
needs: [ distribute_meta_deb ]
uses: s3rj1k/actions-template/.github/workflows/cd-scp.yml@cicd
strategy:
matrix:
os:
- deb
platform:
- amd64
- armhf
with:
RUNNER: ubuntu-latest
CREATE_DESTINATION_FOLDERS: false
EXEC_COMMANDS: 'echo "${{ github.sha }}" > /var/www/sofia-${{ matrix.os }}-${{ matrix.platform }}/${{ github.run_id }}-${{ github.run_number }}/hash.txt'
secrets:
PROXY_URL: ${{ secrets.PROXY_URL }}
USERNAME: ${{ secrets.USERNAME }}
HOSTNAME: ${{ secrets.HOSTNAME }}
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}