Skip to content

Commit

Permalink
ci: push branch manually if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
getchoo committed Jan 11, 2024
1 parent 97c9dfa commit 8fa4fbd
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/update-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8fa4fbd

Please sign in to comment.