Rebuild autogenerated files on commit #3818
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: Rebuild autogenerated files on commit | |
on: | |
push: | |
paths: | |
- accounts/* | |
- collections/* | |
- jettons/* | |
- requirements.txt | |
- generator.py | |
- readme.md.template | |
- .github/workflows/rebuild-src.yml | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
- cron: '27 */3 * * *' | |
jobs: | |
run-aggregator: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install libraries | |
run: pip3 install -r requirements.txt | |
- name: Run generator.py | |
run: python3 generator.py | |
- name: commit and push if there are changes | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "[email protected]" | |
git add -A | |
git commit -m 'Regenerate json and Readme' | |
git push | |
fi |