workflows/{sorbet,spdx}: use origin_branch with git-try-push

This commit is contained in:
nandahkrishna 2021-04-02 07:59:36 +05:30
parent 1fa9a6b7c6
commit 8aa0939c53
No known key found for this signature in database
GPG Key ID: 067E5FCD58ADF3AA
2 changed files with 4 additions and 2 deletions

View File

@ -41,7 +41,7 @@ jobs:
if git ls-remote --exit-code --heads origin "$BRANCH"; then
git checkout "$BRANCH"
git reset origin/master
git reset --hard origin/master
else
git checkout -B "$BRANCH" origin/master
BRANCH_EXISTS="1"
@ -64,6 +64,7 @@ jobs:
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
branch: ${{ steps.update.outputs.branch }}
force: true
origin_branch: "master"
- name: Open a pull request
if: steps.update.outputs.pull_request == 'true'

View File

@ -40,7 +40,7 @@ jobs:
if git ls-remote --exit-code --heads origin "$BRANCH"; then
git checkout "$BRANCH"
git reset origin/master
git reset --hard origin/master
else
git checkout -B "$BRANCH" origin/master
BRANCH_EXISTS="1"
@ -62,6 +62,7 @@ jobs:
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
branch: ${{ steps.update.outputs.branch }}
force: true
origin_branch: "master"
- name: Open a pull request
if: steps.update.outputs.pull_request == 'true'