Sync Two Wiki Repos #498
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Roughly based on | |
# https://www.growingwiththeweb.com/2016/07/enabling-pull-requests-on-github-wikis.html | |
name: Sync Two Wiki Repos | |
on: | |
push: {branches: [main]} | |
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 <[email protected]> | |
AUTH: ${{ secrets.TS_BOT_TOKEN }} |