Files
ArcadeDatabase_MiSTer/.github/workflows/generate_db.yml
2025-06-12 16:10:36 +02:00

52 lines
1.1 KiB
YAML
Executable File

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 "theypsilon@gmail.com"
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 "theypsilon@gmail.com"
git config --global user.name "The CI/CD Bot"
./.github/generate_db.py