Generate DBs #1246
This file contains hidden or 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: Generate DBs | |
| on: | |
| schedule: | |
| - cron: '0 12 * * *' | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: write-all | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install Python dependencies | |
| run: | | |
| pip install tqdm | |
| - name: Generate MAD files from CSV | |
| run: | | |
| mkdir -p mad | |
| python3 csv2mad.py ArcadeDatabase_CSV/ArcadeDatabase.csv | |
| - name: Commit updated MAD files | |
| run: | | |
| git config --global user.name "The CI/CD Bot" | |
| git config --global user.email "[email protected]" | |
| git add mad/ | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "Update generated MAD files" | |
| git push | |
| fi | |
| - name: Generate DBs | |
| run: | | |
| set -euo pipefail | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "The CI/CD Bot" | |
| ./.github/generate_db.py |