diff --git a/.github/workflows/set-version.yaml b/.github/workflows/set-version.yaml index 42cba404d6b3f..a31d849cb4131 100644 --- a/.github/workflows/set-version.yaml +++ b/.github/workflows/set-version.yaml @@ -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 diff --git a/.github/workflows/sync-branch.yaml b/.github/workflows/sync-branch.yaml new file mode 100644 index 0000000000000..642a353aa3c69 --- /dev/null +++ b/.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