Merge pull request #10995 from Homebrew/use-origin-branch

workflows/{sorbet,spdx}: use origin_branch with git-try-push
This commit is contained in:
Nanda H Krishna 2021-04-02 16:54:48 +05:30 committed by GitHub
commit 216e65fdfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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'