ci: push branch manually if needed

This commit is contained in:
seth 2024-01-11 15:55:06 -05:00
parent 97c9dfab96
commit 8fa4fbd819
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86

View file

@ -47,13 +47,16 @@ jobs:
git commit -am "chore: update nvfetch sources"
fi
- name: Create PR
- name: Make PR if needed
env:
GH_TOKEN: ${{ github.token }}
HEAD_BRANCH: ${{ github.repository_owner }}:${{ steps.branch.outputs.branch }}
run: |
gh pr create \
--base main \
--head "${{ env.HEAD_BRANCH }}" \
--title "chore: update lockfiles" \
--fill
if ! git diff --color=always --exit-code origin/main; then
git push -u origin ${{ steps.branch.outputs.branch }}
gh pr create \
--base main \
--head "${{ steps.branch.outputs.branch }}" \
--title "chore: update lockfiles" \
--fill
fi