13
13
GH_TOKEN : ${{ secrets.GH_TOKEN }}
14
14
15
15
jobs :
16
- configure-branch-name :
17
- name : ' Configure Head Branch Name'
18
- runs-on : ubuntu-latest
19
- outputs :
20
- gh_head_ref : ${{ steps.configure-branch-name.outputs.gh_head_ref }}
21
- steps :
22
- - name : Configure branch name
23
- id : configure-branch-name
24
- run : echo "gh_head_ref=$(echo "${{ github.event.pull_request.head.ref }}" | sed 's|/|-|g')" >> $GITHUB_OUTPUT
25
-
26
16
pi-matrix :
27
17
uses : code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_matrix.yml@dev
28
18
secrets : inherit
@@ -138,11 +128,12 @@ jobs:
138
128
pi-update-app :
139
129
name : ' Parent Images: App'
140
130
runs-on : ubuntu-latest
141
- needs : [pi-matrix, configure-branch-name, pi-build]
131
+ needs : [pi-matrix, pi-build]
142
132
environment : dev
143
133
continue-on-error : true
144
134
env :
145
135
PYTHON_VERSION : ${{ vars.PYTHON_VERSION }}
136
+ HEAD_REF : parent-image-updates
146
137
strategy :
147
138
matrix :
148
139
include : ${{ fromJson(needs.pi-matrix.outputs.include) }}
@@ -170,7 +161,7 @@ jobs:
170
161
git config user.email "[email protected] "
171
162
git config user.name "GitHub Actions"
172
163
173
- git checkout -b ${{ needs.configure-branch-name.outputs.gh_head_ref }} || git checkout ${{ needs.configure-branch-name.outputs.gh_head_ref }}
164
+ git checkout -b ${{ env.HEAD_REF }} || git checkout ${{ env.HEAD_REF }}
174
165
175
166
- name : Compile Requirements (Python)
176
167
if : matrix.parent_image_type != 'next'
@@ -195,7 +186,7 @@ jobs:
195
186
196
187
git add requirements/${{ matrix.parent_image_type }}-requirements.txt
197
188
git commit -m "ci: update ${{ matrix.parent_image_type }}-requirements.txt" || true
198
- git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
189
+ git push origin ${{ env.HEAD_REF }}
199
190
echo "::notice::${{ matrix.app }} - updated ${{ matrix.parent_image_type }}-requirements.txt"
200
191
201
192
export exitcode=0
@@ -209,15 +200,15 @@ jobs:
209
200
else
210
201
git add requirements.txt
211
202
git commit -m "ci: update requirements.txt" || true
212
- git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
203
+ git push origin ${{ env.HEAD_REF }}
213
204
echo "::notice::${{ matrix.app }} - updated requirements.txt"
214
205
fi
215
206
216
207
gh pr create --draft \
217
208
--title "${{ github.event.pull_request.title }}" \
218
209
--body "${{ github.event.pull_request.body }}" \
219
210
--base dev \
220
- --head ${{ needs.configure-branch-name.outputs.gh_head_ref }} \
211
+ --head ${{ env.HEAD_REF }} \
221
212
--repo ${{ github.repository_owner }}/${{ matrix.app }} || true
222
213
223
214
- name : Perform Edit/Git Operations (Next)
@@ -227,14 +218,14 @@ jobs:
227
218
228
219
git add package.json
229
220
git commit -m "ci: update ${{ matrix.parent_image_type }} package.json" || true
230
- git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
221
+ git push origin ${{ env.HEAD_REF }}
231
222
echo "::notice::${{ matrix.app }} - updated ${{ matrix.parent_image_type }} package.json"
232
223
233
224
gh pr create --draft \
234
225
--title "${{ github.event.pull_request.title }}" \
235
226
--body "${{ github.event.pull_request.body }}" \
236
227
--base dev \
237
- --head ${{ needs.configure-branch-name.outputs.gh_head_ref }} \
228
+ --head ${{ env.HEAD_REF }} \
238
229
--repo ${{ github.repository_owner }}/${{ matrix.app }} || true
239
230
240
231
gh-delete-branch :
0 commit comments