1313 GH_TOKEN : ${{ secrets.GH_TOKEN }}
1414
1515jobs :
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-
2616 pi-matrix :
2717 uses : code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_matrix.yml@dev
2818 secrets : inherit
@@ -138,11 +128,12 @@ jobs:
138128 pi-update-app :
139129 name : ' Parent Images: App'
140130 runs-on : ubuntu-latest
141- needs : [pi-matrix, configure-branch-name, pi-build]
131+ needs : [pi-matrix, pi-build]
142132 environment : dev
143133 continue-on-error : true
144134 env :
145135 PYTHON_VERSION : ${{ vars.PYTHON_VERSION }}
136+ HEAD_REF : parent-image-updates
146137 strategy :
147138 matrix :
148139 include : ${{ fromJson(needs.pi-matrix.outputs.include) }}
@@ -170,7 +161,7 @@ jobs:
170161 git config user.email "[email protected] " 171162 git config user.name "GitHub Actions"
172163
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 }}
174165
175166 - name : Compile Requirements (Python)
176167 if : matrix.parent_image_type != 'next'
@@ -195,7 +186,7 @@ jobs:
195186
196187 git add requirements/${{ matrix.parent_image_type }}-requirements.txt
197188 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 }}
199190 echo "::notice::${{ matrix.app }} - updated ${{ matrix.parent_image_type }}-requirements.txt"
200191
201192 export exitcode=0
@@ -209,15 +200,15 @@ jobs:
209200 else
210201 git add requirements.txt
211202 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 }}
213204 echo "::notice::${{ matrix.app }} - updated requirements.txt"
214205 fi
215206
216207 gh pr create --draft \
217208 --title "${{ github.event.pull_request.title }}" \
218209 --body "${{ github.event.pull_request.body }}" \
219210 --base dev \
220- --head ${{ needs.configure-branch-name.outputs.gh_head_ref }} \
211+ --head ${{ env.HEAD_REF }} \
221212 --repo ${{ github.repository_owner }}/${{ matrix.app }} || true
222213
223214 - name : Perform Edit/Git Operations (Next)
@@ -227,14 +218,14 @@ jobs:
227218
228219 git add package.json
229220 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 }}
231222 echo "::notice::${{ matrix.app }} - updated ${{ matrix.parent_image_type }} package.json"
232223
233224 gh pr create --draft \
234225 --title "${{ github.event.pull_request.title }}" \
235226 --body "${{ github.event.pull_request.body }}" \
236227 --base dev \
237- --head ${{ needs.configure-branch-name.outputs.gh_head_ref }} \
228+ --head ${{ env.HEAD_REF }} \
238229 --repo ${{ github.repository_owner }}/${{ matrix.app }} || true
239230
240231 gh-delete-branch :
0 commit comments