Small branch sync script change
This commit is contained in:
parent
610fa28de5
commit
44d9ceaf14
9
.github/workflows/sync-branch.yaml
vendored
9
.github/workflows/sync-branch.yaml
vendored
|
@ -3,6 +3,11 @@ name: Sync branch with master
|
||||||
on:
|
on:
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types: sync-branch
|
types: sync-branch
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
branch_name:
|
||||||
|
description: 'Target Branch Name'
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -15,7 +20,7 @@ jobs:
|
||||||
node-version: 12.x
|
node-version: 12.x
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.client_payload.branch_name }}
|
ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }}
|
||||||
# This does a test post-merge and only pushes the result if the test succeeds
|
# This does a test post-merge and only pushes the result if the test succeeds
|
||||||
# required client_payload members:
|
# required client_payload members:
|
||||||
# branch_name - the target branch
|
# branch_name - the target branch
|
||||||
|
@ -23,7 +28,7 @@ jobs:
|
||||||
git config user.email "ts_bot@rcavanaugh.com"
|
git config user.email "ts_bot@rcavanaugh.com"
|
||||||
git config user.name "TypeScript Bot"
|
git config user.name "TypeScript Bot"
|
||||||
git fetch origin master
|
git fetch origin master
|
||||||
git merge master --no-ff
|
git merge origin/master --no-ff
|
||||||
npm install
|
npm install
|
||||||
npm test
|
npm test
|
||||||
git push
|
git push
|
||||||
|
|
Loading…
Reference in a new issue