1
+ name : Build and Distribute Sofia-Sip
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ paths :
7
+ - " **"
8
+ - " !debian/changelog"
9
+ workflow_dispatch :
10
+
11
+ concurrency :
12
+ group : ${{ github.head_ref || github.ref }}
13
+
14
+ jobs :
15
+
16
+ sofia_build_rpm :
17
+ name : ' Build Rpm'
18
+ uses : signalwire/actions-template/.github/workflows/ci-rpm-packages.yml@main
19
+ with :
20
+ PROJECT_NAME : sofia-sip
21
+ RUNNER : ubuntu-latest
22
+ PACKAGER :
' packager Andrey Volk <[email protected] >'
23
+ PLATFORM : amd64
24
+ secrets : inherit
25
+
26
+ sofia_build_deb :
27
+ name : ' Build Deb'
28
+ uses : signalwire/actions-template/.github/workflows/ci-deb-packages-v2.yml@main
29
+ strategy :
30
+ fail-fast : false
31
+ matrix :
32
+ BASE_IMAGE :
33
+ - signalwire/build-deb-action:bullseye
34
+ - signalwire/build-deb-action:buster
35
+ - signalwire/build-deb-action:stretch
36
+ PLATFORM :
37
+ - amd64
38
+ - arm
39
+ with :
40
+ PROJECT_NAME : sofia-sip
41
+ RUNNER : ubuntu-latest
42
+ BASE_IMAGE : ${{matrix.BASE_IMAGE}}
43
+ PLATFORM : ${{matrix.PLATFORM}}
44
+
45
+ generate_meta :
46
+ name : ' Meta'
47
+ needs : [sofia_build_rpm, sofia_build_deb]
48
+ strategy :
49
+ matrix :
50
+ platform :
51
+ - deb-amd64
52
+ - deb-arm
53
+ - rpm-amd64
54
+
55
+ uses : signalwire/actions-template/.github/workflows/ci-libs-metadata-v2.yml@main
56
+ with :
57
+ ARTIFACT_NAME : ${{ matrix.platform }}-artifact
58
+ OS_PLATFORM : ${{ matrix.platform }}
59
+ RUNNER : ubuntu-latest
60
+ FILE_PATH_PREFIX : /var/www/sofia-${{ matrix.platform }}/${{github.run_id}}-${{github.run_number}}
61
+
62
+ distribute_matrix :
63
+ permissions : write-all
64
+ name : ' Copy to remote'
65
+ needs : [sofia_build_rpm, sofia_build_deb]
66
+ strategy :
67
+ matrix :
68
+ os_platform :
69
+ - deb-amd64
70
+ - deb-arm
71
+ - rpm-amd64
72
+
73
+ uses : signalwire/actions-template/.github/workflows/cd-scp.yml@main
74
+ with :
75
+ ARTIFACT_NAME : ${{ matrix.os_platform }}-artifact
76
+ TARGET_FOLDER : /var/www/sofia-${{ matrix.os_platform }}/${{github.run_id}}-${{github.run_number}}
77
+ RUNNER : ubuntu-latest
78
+ FILES : ' *.tar.gz'
79
+ CREATE_DESTINATION_FOLDERS : true
80
+ secrets :
81
+ # Explicit define secrets for better understanding but it could be just inherit
82
+ PROXY_URL : ${{ secrets.PROXY_URL }}
83
+ USERNAME : ${{ secrets.USERNAME }}
84
+ HOSTNAME : ${{ secrets.HOSTNAME }}
85
+ TELEPORT_TOKEN : ${{ secrets.TELEPORT_TOKEN }}
86
+
87
+ distribute_meta_deb :
88
+ permissions : write-all
89
+ name : ' Copy meta to remote'
90
+ needs : generate_meta
91
+ strategy :
92
+ matrix :
93
+ os :
94
+ - deb
95
+ platform :
96
+ - amd64
97
+ - arm
98
+
99
+ uses : signalwire/actions-template/.github/workflows/cd-libs-metadata.yml@main
100
+ with :
101
+ ARTIFACT_NAME : ${{ matrix.os }}-${{matrix.platform}}-meta
102
+ LIB_NAME : sofia-sip
103
+ TARGET_OS : ${{ matrix.os }}
104
+ TARGET_PLATFORM : ${{ matrix.platform }}
105
+ RUNNER : ubuntu-latest
106
+ TARGET_REPO : signalwire/bamboo_gha_trigger
107
+ secrets :
108
+ GH_BOT_DEPLOY_TOKEN : ${{ secrets.PAT }}
109
+
110
+ distribute_meta_rpm :
111
+ permissions : write-all
112
+ name : ' Copy meta to remote'
113
+ needs : generate_meta
114
+ strategy :
115
+ matrix :
116
+ os :
117
+ - rpm
118
+ platform :
119
+ - amd64
120
+
121
+ uses : signalwire/actions-template/.github/workflows/cd-libs-metadata.yml@main
122
+ with :
123
+ ARTIFACT_NAME : ${{ matrix.os }}-${{matrix.platform}}-meta
124
+ LIB_NAME : sofia-sip
125
+ TARGET_OS : ${{ matrix.os }}
126
+ TARGET_PLATFORM : ${{ matrix.platform }}
127
+ RUNNER : ubuntu-latest
128
+ TARGET_REPO : signalwire/bamboo_gha_trigger
129
+ secrets :
130
+ GH_BOT_DEPLOY_TOKEN : ${{ secrets.PAT }}
131
+
132
+ distribute_hash :
133
+ permissions : write-all
134
+ name : ' Copy hash to remote'
135
+ needs : [distribute_meta_deb, distribute_meta_rpm]
136
+ uses : signalwire/actions-template/.github/workflows/cd-scp.yml@main
137
+ strategy :
138
+ matrix :
139
+ os_platform :
140
+ - deb-amd64
141
+ - deb-arm
142
+ - rpm-amd64
143
+ with :
144
+ RUNNER : ubuntu-latest
145
+ CREATE_DESTINATION_FOLDERS : false
146
+ EXEC_COMMANDS : ' echo "${{github.sha}}" > /var/www/sofia-${{ matrix.os_platform }}/${{github.run_id}}-${{github.run_number}}/hash.txt'
147
+ secrets :
148
+ PROXY_URL : ${{ secrets.PROXY_URL }}
149
+ USERNAME : ${{ secrets.USERNAME }}
150
+ HOSTNAME : ${{ secrets.HOSTNAME }}
151
+ TELEPORT_TOKEN : ${{ secrets.TELEPORT_TOKEN }}
152
+
0 commit comments