2020-02-21 00:06:58 +01:00
|
|
|
name: Sync branch with master
|
|
|
|
|
|
|
|
on:
|
|
|
|
repository_dispatch:
|
|
|
|
types: sync-branch
|
2020-08-13 22:17:05 +02:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
branch_name:
|
|
|
|
description: 'Target Branch Name'
|
|
|
|
required: true
|
2020-02-21 00:06:58 +01:00
|
|
|
|
|
|
|
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:
|
2020-08-13 22:17:05 +02:00
|
|
|
ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }}
|
2020-09-15 04:55:36 +02:00
|
|
|
fetch-depth: 0
|
2020-02-21 00:06:58 +01:00
|
|
|
# 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: |
|
2020-08-20 03:01:29 +02:00
|
|
|
git config user.email "typescriptbot@microsoft.com"
|
2020-02-21 00:06:58 +01:00
|
|
|
git config user.name "TypeScript Bot"
|
|
|
|
git fetch origin master
|
2020-08-13 22:17:05 +02:00
|
|
|
git merge origin/master --no-ff
|
2020-08-20 01:50:23 +02:00
|
|
|
npm ci
|
2020-02-21 00:06:58 +01:00
|
|
|
npm test
|
|
|
|
git push
|