Try removing fetch-depth 0 config to improve speed, add sync-branch workflow

This commit is contained in:
Wesley Wigham 2020-02-20 15:06:58 -08:00
parent 7ee1ef008a
commit d0c961e544
No known key found for this signature in database
GPG Key ID: D59F87F60C5400C9
2 changed files with 29 additions and 1 deletions

View File

@ -16,7 +16,6 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.branch_name }}
fetch-depth: 0
# notably, this is essentially the same script as `new-release-branch.yaml` (with fewer inputs), but it assumes the branch already exists
# do note that executing the transform below will prevent the `configurePrerelease` script from running on the source, as it makes the
# `version` identifier no longer match the regex it uses

29
.github/workflows/sync-branch.yaml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Sync branch with master
on:
repository_dispatch:
types: sync-branch
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.client_payload.branch_name }}
# 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 "ts_bot@rcavanaugh.com"
git config user.name "TypeScript Bot"
git fetch origin master
git merge master --no-ff
npm install
npm test
git push