Update Grammars #1124
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: 'Update Grammars' | |
on: | |
schedule: | |
- cron: '0 6 * * *' | |
workflow_dispatch: | |
jobs: | |
update-grammars: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: cache pnpm modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: pnpm setup | |
uses: pnpm/[email protected] | |
with: | |
version: 6.31.0 | |
run_install: true | |
- run: pnpm run update:grammars | |
- run: pnpm run build | |
- run: pnpm run test | |
env: | |
CI: true | |
- name: commit | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
git config user.name "Pine Wu" | |
git config user.email [email protected] | |
git status | |
git add -A | |
git commit -m "🤖: update grammars" | |
git push | |
else | |
echo "no changes" | |
fi |