forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 3
35 lines (32 loc) · 956 Bytes
/
sync-branch.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Sync branch with master
on:
repository_dispatch:
types: sync-branch
workflow_dispatch:
inputs:
branch_name:
description: 'Target Branch Name'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Use node version 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }}
fetch-depth: 0
# This does a test post-merge and only pushes the result if the test succeeds
# required client_payload members:
# branch_name - the target branch
- run: |
git config user.email "[email protected]"
git config user.name "TypeScript Bot"
git fetch origin master
git merge origin/master --no-ff
npm ci
npm test
git push