88 paths :
99 - " **"
1010 workflow_dispatch :
11+ inputs :
12+ publish :
13+ description : ' Publish build data'
14+ required : true
15+ default : false
16+ type : boolean
1117
1218concurrency :
1319 group : ${{ github.head_ref || github.ref }}
1420
1521jobs :
22+ get-nonce :
23+ name : ' Get Nonce for token'
24+ runs-on : freeswitch-org-auth-client
25+ outputs :
26+ nonce : ${{ steps.get-nonce.outputs.nonce }}
27+ steps :
28+ - name : Get Nonce
29+ id : get-nonce
30+ uses : signalwire/actions-template/.github/actions/repo-auth-client@main
31+ with :
32+ mode : nonce
33+
34+ issue-token :
35+ name : ' Issue temporary token'
36+ runs-on : ubuntu-latest
37+ needs : get-nonce
38+ outputs :
39+ token : ${{ steps.issue-token.outputs.token }}
40+ steps :
41+ - name : Issue Token
42+ id : issue-token
43+ uses : signalwire/actions-template/.github/actions/repo-auth-client@main
44+ env :
45+ NONCE : ${{ needs.get-nonce.outputs.nonce }}
46+ with :
47+ mode : issue
48+
1649 deb-fse :
1750 name : ' DEB-FSE'
51+ if : >-
52+ ${{
53+ github.event.pull_request.head.repo.full_name == github.repository ||
54+ github.actor == github.repository_owner ||
55+ github.actor.belongs_to_organization
56+ }}
1857 permissions :
1958 id-token : write
2059 contents : read
4685 PLATFORM : ${{ matrix.platform.name }}
4786 REPO_DOMAIN : ' fsa.freeswitch.com'
4887 TARGET_ARTIFACT_NAME : ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-fse-${{ matrix.release }}-artifact
49- UPLOAD_BUILD_ARTIFACTS : ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }}
88+ UPLOAD_BUILD_ARTIFACTS : >-
89+ ${{
90+ (github.event.pull_request.head.repo.full_name == github.repository) &&
91+ (
92+ (
93+ github.event_name != 'pull_request' &&
94+ github.event_name != 'workflow_dispatch'
95+ ) ||
96+ (github.event_name == 'workflow_dispatch' && inputs.publish)
97+ )
98+ }}
5099 secrets :
51100 GH_BOT_DEPLOY_TOKEN : ${{ secrets.PAT }}
52101 HOSTNAME : ${{ secrets.HOSTNAME }}
61110 permissions :
62111 id-token : write
63112 contents : read
113+ needs :
114+ - issue-token
64115 uses : signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main
65116 strategy :
66117 # max-parallel: 1
@@ -74,10 +125,10 @@ jobs:
74125 platform :
75126 - name : amd64
76127 runner : ubuntu-latest
77- # - name: arm32v7
78- # runner: ubuntu-24.04-arm
79- # - name: arm64v8
80- # runner: ubuntu-24.04-arm
128+ - name : arm32v7
129+ runner : ubuntu-24.04-arm
130+ - name : arm64v8
131+ runner : ubuntu-24.04-arm
81132 release :
82133 - release
83134 with :
@@ -89,19 +140,55 @@ jobs:
89140 PLATFORM : ${{ matrix.platform.name }}
90141 REPO_DOMAIN : ' freeswitch.signalwire.com'
91142 TARGET_ARTIFACT_NAME : ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-${{ matrix.release }}-artifact
92- UPLOAD_BUILD_ARTIFACTS : ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }}
143+ UPLOAD_BUILD_ARTIFACTS : >-
144+ ${{
145+ (github.event.pull_request.head.repo.full_name == github.repository) &&
146+ (
147+ (
148+ github.event_name != 'pull_request' &&
149+ github.event_name != 'workflow_dispatch'
150+ ) ||
151+ (github.event_name == 'workflow_dispatch' && inputs.publish)
152+ )
153+ }}
93154 secrets :
94155 GH_BOT_DEPLOY_TOKEN : ${{ secrets.PAT }}
95156 HOSTNAME : ${{ secrets.HOSTNAME }}
96157 PROXY_URL : ${{ secrets.PROXY_URL }}
97158 USERNAME : ${{ secrets.USERNAME }}
98159 TELEPORT_TOKEN : ${{ secrets.TELEPORT_TOKEN }}
99160 REPO_USERNAME : ' signalwire'
100- REPO_PASSWORD : ${{ secrets.REPOTOKEN }}
161+ REPO_PASSWORD : ${{ needs.issue-token.outputs.token }}
162+
163+ revoke-token :
164+ name : ' Revoke temporary token'
165+ runs-on : ubuntu-latest
166+ # if: always()
167+ needs :
168+ - issue-token
169+ - deb-public
170+ steps :
171+ - name : Revoke Token
172+ id : revoke-token
173+ uses : signalwire/actions-template/.github/actions/repo-auth-client@main
174+ env :
175+ TOKEN : ${{ needs.issue-token.outputs.token }}
176+ with :
177+ mode : revoke
101178
102179 meta :
103180 name : ' Publish build data to meta-repo'
104- if : ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }}
181+ if : >-
182+ ${{
183+ (github.event.pull_request.head.repo.full_name == github.repository) &&
184+ (
185+ (
186+ github.event_name != 'pull_request' &&
187+ github.event_name != 'workflow_dispatch'
188+ ) ||
189+ (github.event_name == 'workflow_dispatch' && inputs.publish)
190+ )
191+ }}
105192 needs :
106193 - deb-fse
107194 - deb-public
0 commit comments