Create the branch only if needed
This commit is contained in:
parent
6f9fc6eab1
commit
1ee5a6cee5
|
@ -140,6 +140,7 @@ runs:
|
|||
git fetch origin $DESTINATION_BRANCH
|
||||
else
|
||||
export BASE=$(gh repo view --json defaultBranchRef --template '{{ .defaultBranchRef.name }}' ${{github.repository}})
|
||||
export BASE_SHA=$( git rev-parse origin/$BASE )
|
||||
gh api --method POST /repos/:owner/:repo/git/refs \
|
||||
--field ref=refs/heads/$DESTINATION_BRANCH \
|
||||
--field sha=$BASE_SHA
|
||||
|
|
Loading…
Reference in New Issue