Skip to content

Commit d0c961e

Browse files
committed
Try removing fetch-depth 0 config to improve speed, add sync-branch workflow
1 parent 7ee1ef0 commit d0c961e

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/workflows/set-version.yaml

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

.github/workflows/sync-branch.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync branch with master
2+
3+
on:
4+
repository_dispatch:
5+
types: sync-branch
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Use node version 12.x
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12.x
16+
- uses: actions/checkout@v2
17+
with:
18+
ref: ${{ github.event.client_payload.branch_name }}
19+
# This does a test post-merge and only pushes the result if the test succeeds
20+
# required client_payload members:
21+
# branch_name - the target branch
22+
- run: |
23+
git config user.email "[email protected]"
24+
git config user.name "TypeScript Bot"
25+
git fetch origin master
26+
git merge master --no-ff
27+
npm install
28+
npm test
29+
git push

0 commit comments

Comments
 (0)