Skip to content

Update database

Update database #162

Workflow file for this run

name: Update database
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./database/requirements.txt
- name: Run Script
run: |
python ./database/database_fetcher.py recent
- name: Configure Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit and Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git add ./database/fetch_recent.log
git add ./database/translations.json
git add ./database/database.db
git commit -m 'Database update'
git push origin HEAD:${{ github.ref }}
- name: Upload Log File
uses: actions/upload-artifact@v4
with:
name: database-fetcher-log
path: ./database/fetch_recent.log
- name: Upload Translation File
uses: actions/upload-artifact@v4
with:
name: game-name-translations
path: ./database/translations.json
- name: Upload Database File
uses: actions/upload-artifact@v4
with:
name: database-file
path: ./database/database.db