JSON scheduled update #50
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: JSON scheduled update | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: update JSON file | |
run: | | |
curl https://raw.githubusercontent.com/Mimori256/kdb-parse/main/kdb_twinc.json > kdb.json | |
- name: Commit and Push | |
run: | | |
git add . | |
if git diff --exit-code --quiet | |
then | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
git pull | |
git commit -m "update JSON: $(date +%Y%m%d)" | |
git push -f origin main | |
fi |