Skip to content

Commit

Permalink
Try removing fetch-depth 0 config to improve speed, add sync-branch w…
Browse files Browse the repository at this point in the history
…orkflow
  • Loading branch information
weswigham committed Feb 20, 2020
1 parent 7ee1ef0 commit d0c961e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/set-version.yaml
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/sync-branch.yaml
@@ -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

0 comments on commit d0c961e

Please sign in to comment.