Formal verification #8
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 JSON on Markdown Change | |
on: | |
pull_request: | |
paths: | |
- '**/*.md' | |
push: | |
branches: | |
- main | |
- dev | |
paths: | |
- '**/*.md' | |
jobs: | |
update-json: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Run script to update JSON | |
run: node update_json.js | |
- name: Commit and push if changed | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git add -u | |
git commit -m "Updated JSON file via GitHub Actions" || exit 0 # This will not fail if no changes | |
git push |