workflows/{sorbet,spdx}: use origin_branch with git-try-push
This commit is contained in:
parent
1fa9a6b7c6
commit
8aa0939c53
3
.github/workflows/sorbet.yml
vendored
3
.github/workflows/sorbet.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
|||||||
|
|
||||||
if git ls-remote --exit-code --heads origin "$BRANCH"; then
|
if git ls-remote --exit-code --heads origin "$BRANCH"; then
|
||||||
git checkout "$BRANCH"
|
git checkout "$BRANCH"
|
||||||
git reset origin/master
|
git reset --hard origin/master
|
||||||
else
|
else
|
||||||
git checkout -B "$BRANCH" origin/master
|
git checkout -B "$BRANCH" origin/master
|
||||||
BRANCH_EXISTS="1"
|
BRANCH_EXISTS="1"
|
||||||
@ -64,6 +64,7 @@ jobs:
|
|||||||
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||||
branch: ${{ steps.update.outputs.branch }}
|
branch: ${{ steps.update.outputs.branch }}
|
||||||
force: true
|
force: true
|
||||||
|
origin_branch: "master"
|
||||||
|
|
||||||
- name: Open a pull request
|
- name: Open a pull request
|
||||||
if: steps.update.outputs.pull_request == 'true'
|
if: steps.update.outputs.pull_request == 'true'
|
||||||
|
3
.github/workflows/spdx.yml
vendored
3
.github/workflows/spdx.yml
vendored
@ -40,7 +40,7 @@ jobs:
|
|||||||
|
|
||||||
if git ls-remote --exit-code --heads origin "$BRANCH"; then
|
if git ls-remote --exit-code --heads origin "$BRANCH"; then
|
||||||
git checkout "$BRANCH"
|
git checkout "$BRANCH"
|
||||||
git reset origin/master
|
git reset --hard origin/master
|
||||||
else
|
else
|
||||||
git checkout -B "$BRANCH" origin/master
|
git checkout -B "$BRANCH" origin/master
|
||||||
BRANCH_EXISTS="1"
|
BRANCH_EXISTS="1"
|
||||||
@ -62,6 +62,7 @@ jobs:
|
|||||||
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||||
branch: ${{ steps.update.outputs.branch }}
|
branch: ${{ steps.update.outputs.branch }}
|
||||||
force: true
|
force: true
|
||||||
|
origin_branch: "master"
|
||||||
|
|
||||||
- name: Open a pull request
|
- name: Open a pull request
|
||||||
if: steps.update.outputs.pull_request == 'true'
|
if: steps.update.outputs.pull_request == 'true'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user