forked from microsoft/TypeScript-wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (24 loc) · 851 Bytes
/
sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Roughly based on
# https://www.growingwiththeweb.com/2016/07/enabling-pull-requests-on-github-wikis.html
name: Sync Two Wiki Repos
on:
push: {branches: [master]}
schedule: [{cron: "7 0 * * 1,3"}] # https://crontab.guru/#7_0_*_*_1,3
workflow_dispatch: # on request
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Get repo name
run: R=${GITHUB_REPOSITORY%?wiki}; echo "BASENAME=${R##*/}" >> $GITHUB_ENV
- name: Checkout ${{ env.BASENAME }}-wiki
uses: actions/checkout@v2
with:
repository: "${{ GITHUB.repository_owner }}/${{ env.BASENAME }}-wiki"
token: ${{ secrets.TS_BOT_TOKEN }}
fetch-depth: 0
- name: Run sync
run: ./.github/workflows/sync
env:
PUSHER: typescript-bot <bot@typescriptlang.org>
AUTH: ${{ secrets.TS_BOT_TOKEN }}