Skip to content

Commit dca06dd

Browse files
committed
fix: pi_merge_submodule checkout
1 parent 5a37d7e commit dca06dd

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/pi_merge_submodule.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
repository: "${{ github.repository_owner }}/refinery-submodule-parent-images"
3232

3333
pi-update-submodule:
34-
name: 'Parent Images: Submodules'
34+
name: 'Parent Images: Submodule'
3535
runs-on: ubuntu-latest
3636
needs: [pi-matrix, configure-branch-name]
3737
environment: dev
@@ -82,9 +82,9 @@ jobs:
8282
--repo ${{ github.repository_owner }}/refinery-${{ matrix.parent_image_type }}-parent-image
8383
8484
pi-update-app:
85-
name: 'Parent Images: ' # suffix populated by matrix
85+
name: 'Parent Images: App'
8686
runs-on: ubuntu-latest
87-
needs: [pi-matrix, configure-branch-name]
87+
needs: [pi-matrix, configure-branch-name, pi-update-submodule]
8888
environment: dev
8989
continue-on-error: true
9090
env:
@@ -108,8 +108,16 @@ jobs:
108108
run: python -m pip install pip-tools
109109

110110
- name: Clone ${{ matrix.app }}
111-
run: git clone https://oauth2:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository_owner }}/${{ matrix.app }}.git
112-
111+
run: |
112+
git clone https://oauth2:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository_owner }}/${{ matrix.app }}.git
113+
cd ${{ matrix.app }}
114+
115+
git config user.email "devtools@kern.ai"
116+
git config user.name "GitHub Actions"
117+
118+
git checkout -b ${{ needs.configure-branch-name.outputs.gh_head_ref }} || git checkout ${{ needs.configure-branch-name.outputs.gh_head_ref }}
119+
git pull origin ${{ needs.configure-branch-name.outputs.gh_head_ref }} && git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
120+
113121
- name: Compile Requirements
114122
run: |
115123
pip-compile --quiet \
@@ -124,14 +132,8 @@ jobs:
124132
run: |
125133
cd ${{ matrix.app }}
126134
127-
git config user.email "devtools@kern.ai"
128-
git config user.name "GitHub Actions"
129-
130-
git checkout -b ${{ needs.configure-branch-name.outputs.gh_head_ref }} || git checkout ${{ needs.configure-branch-name.outputs.gh_head_ref }}
131-
git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }} && git pull origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
132-
133135
git add requirements*
134-
git commit -m "ci: update ${{ matrix.parent_image_type }}-requirements.txt"
136+
git commit -m "ci: update ${{ matrix.parent_image_type }}-requirements.txt" || true
135137
git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
136138
echo "::notice::${{ matrix.app }} updated to origin/${{ needs.configure-branch-name.outputs.gh_head_ref }}"
137139

0 commit comments

Comments
 (0)