Skip to content

Commit 148f294

Browse files
committed
fix(workflows): don't use needs.init.outputs.head_ref directly
Signed-off-by: skjnldsv <[email protected]>
1 parent 36b510a commit 148f294

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/command-compile.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,15 @@ jobs:
202202
203203
- name: Push normally
204204
if: ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }}
205-
run: git push origin '${{ needs.init.outputs.head_ref }}'
205+
env:
206+
HEAD_REF: ${{ needs.init.outputs.head_ref }}
207+
run: git push origin "$HEAD_REF"
206208

207209
- name: Force push
208210
if: ${{ contains(needs.init.outputs.arg1, 'rebase') || contains(needs.init.outputs.arg1, 'amend') }}
209-
run: git push --force-with-lease origin '${{ needs.init.outputs.head_ref }}'
211+
env:
212+
HEAD_REF: ${{ needs.init.outputs.head_ref }}
213+
run: git push --force-with-lease origin "$HEAD_REF"
210214

211215
- name: Add reaction on failure
212216
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0

0 commit comments

Comments
 (0)