Sync Versions #1567
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
name: Sync Versions | |
on: | |
schedule: | |
- cron: "0 4 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# Otherwise the token used is the GITHUB_TOKEN instead of personal | |
persist-credentials: false | |
# Otherwise will fail to push refs to destination repo | |
fetch-depth: 0 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "18" | |
- name: Update tooling versions | |
run: | | |
git config --local pull.ff only | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git pull | |
node ./dist/update.js | |
git diff --quiet || git commit -a -m "Sync repository with latest tooling." | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: ${{ github.ref }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} |