@@ -118,29 +118,67 @@ jobs:
118
118
git checkout -b ${{ needs.configure-branch-name.outputs.gh_head_ref }} || git checkout ${{ needs.configure-branch-name.outputs.gh_head_ref }}
119
119
git pull origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
120
120
121
- - name : Compile Requirements
121
+ - name : Compile Requirements (Python)
122
+ if : matrix.parent_image_type != 'next'
122
123
run : |
123
124
pip-compile --quiet \
124
125
--output-file ${{ matrix.app }}/requirements/${{ matrix.parent_image_type }}-requirements.txt \
125
126
submodules/parent-images/requirements/${{ matrix.parent_image_type }}-requirements.in
126
-
127
- pip-compile --quiet \
128
- --output-file ${{ matrix.app }}/requirements.txt \
129
- ${{ matrix.app }}/requirements/requirements.in
130
-
131
- - name : Perform Edit/Git Operations
127
+
128
+ - name : Compile Requirements (Next)
129
+ if : matrix.parent_image_type == 'next'
130
+ run : |
131
+ jq --slurp '.[0] * .[1]' \
132
+ package.json \
133
+ ${{ matrix.app }}/package.json \
134
+ > package.json.tmp
135
+ mv package.json.tmp ${{ matrix.app }}/package.json
136
+
137
+ - name : Perform Edit/Git Operations (Python)
138
+ if : matrix.parent_image_type != 'next'
132
139
run : |
133
140
cd ${{ github.workspace }}/${{ matrix.app }}
134
141
135
- git add requirements*
142
+ git add requirements/${{ matrix.parent_image_type }}-requirements.in
136
143
git commit -m "ci: update ${{ matrix.parent_image_type }}-requirements.txt" || true
137
144
git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
138
- echo "::notice::${{ matrix.app }} updated to origin/${{ needs.configure-branch-name.outputs.gh_head_ref }}"
145
+ echo "::notice::${{ matrix.app }} - updated ${{ matrix.parent_image_type }}-requirements.txt"
146
+
147
+ export exitcode=0
148
+ pip-compile --quiet \
149
+ --output-file requirements.txt \
150
+ requirements/requirements.in || export exitcode=$?
151
+
152
+ if [ $exitcode -ne 0 ]; then
153
+ echo "::error::pip-compile failed with exit code $exitcode"
154
+ exit $exitcode
155
+ else
156
+ git add requirements.txt
157
+ git commit -m "ci: update requirements.txt" || true
158
+ git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
159
+ echo "::notice::${{ matrix.app }} - updated requirements.txt"
160
+ fi
139
161
140
162
gh pr create --draft \
141
163
--title "${{ github.event.pull_request.title }}" \
142
164
--body "${{ github.event.pull_request.body }}" \
143
165
--base dev \
144
166
--head ${{ needs.configure-branch-name.outputs.gh_head_ref }} \
145
167
--repo ${{ github.repository_owner }}/${{ matrix.app }} || true
146
-
168
+
169
+ - name : Perform Edit/Git Operations (Next)
170
+ if : matrix.parent_image_type == 'next'
171
+ run : |
172
+ cd ${{ github.workspace }}/${{ matrix.app }}
173
+
174
+ git add package.json
175
+ git commit -m "ci: update ${{ matrix.parent_image_type }} package.json" || true
176
+ git push origin ${{ needs.configure-branch-name.outputs.gh_head_ref }}
177
+ echo "::notice::${{ matrix.app }} - updated ${{ matrix.parent_image_type }} package.json"
178
+
179
+ gh pr create --draft \
180
+ --title "${{ github.event.pull_request.title }}" \
181
+ --body "${{ github.event.pull_request.body }}" \
182
+ --base dev \
183
+ --head ${{ needs.configure-branch-name.outputs.gh_head_ref }} \
184
+ --repo ${{ github.repository_owner }}/${{ matrix.app }} || true
0 commit comments