Skip to content

Generate DBs

Generate DBs #1262

Workflow file for this run

name: Generate DBs
on:
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.12'
- name: Install Python dependencies
run: pip install tqdm==4.67.1
- name: Generate MAD files from CSV
run: |
set -euo pipefail
git config --global user.name "The CI/CD Bot"
git config --global user.email "[email protected]"
rm -rf mad
mkdir mad
python3 csv2mad.py ArcadeDatabase.csv
git add -A mad/
if git diff --cached --quiet; then
echo "No MAD changes detected"
echo "MAD_CHANGES=false" >> $GITHUB_ENV
else
echo "MAD changes detected"
git commit -m "Update generated MAD files"
git push origin main
echo "MAD_CHANGES=true" >> $GITHUB_ENV
fi
- name: Generate DB
if: env.MAD_CHANGES == 'true'
run: ./.github/generate_db.py