fix(workflows): don't use needs.init.outputs.head_ref directly

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
pull/54139/head
skjnldsv 2025-07-29 15:58:13 +07:00
parent 36b510a38a
commit 148f29475e
1 changed files with 6 additions and 2 deletions

@ -202,11 +202,15 @@ jobs:
- name: Push normally
if: ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }}
run: git push origin '${{ needs.init.outputs.head_ref }}'
env:
HEAD_REF: ${{ needs.init.outputs.head_ref }}
run: git push origin "$HEAD_REF"
- name: Force push
if: ${{ contains(needs.init.outputs.arg1, 'rebase') || contains(needs.init.outputs.arg1, 'amend') }}
run: git push --force-with-lease origin '${{ needs.init.outputs.head_ref }}'
env:
HEAD_REF: ${{ needs.init.outputs.head_ref }}
run: git push --force-with-lease origin "$HEAD_REF"
- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0