Skip to content

Commit 44d9cea

Browse files
committed
Small branch sync script change
1 parent 610fa28 commit 44d9cea

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/sync-branch.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Sync branch with master
33
on:
44
repository_dispatch:
55
types: sync-branch
6+
workflow_dispatch:
7+
inputs:
8+
branch_name:
9+
description: 'Target Branch Name'
10+
required: true
611

712
jobs:
813
build:
@@ -15,15 +20,15 @@ jobs:
1520
node-version: 12.x
1621
- uses: actions/checkout@v2
1722
with:
18-
ref: ${{ github.event.client_payload.branch_name }}
23+
ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }}
1924
# This does a test post-merge and only pushes the result if the test succeeds
2025
# required client_payload members:
2126
# branch_name - the target branch
2227
- run: |
2328
git config user.email "[email protected]"
2429
git config user.name "TypeScript Bot"
2530
git fetch origin master
26-
git merge master --no-ff
31+
git merge origin/master --no-ff
2732
npm install
2833
npm test
2934
git push

0 commit comments

Comments
 (0)