Skip to content

Update Database

Update Database #2397

Workflow file for this run

name: Update Database
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Install Requirements
run: pip install -r requirements.txt
- name: Download Latest Charts
run: |
DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} \
SERVICE_ACCOUNT_KEY='${{ secrets.SERVICE_ACCOUNT_KEY }}' \
CHARTS_CHANNEL=${{ vars.CHARTS_CHANNEL }} \
SUBMISSIONS_CHANNEL=${{ vars.SUBMISSIONS_CHANNEL}} \
TOOTBENDER_ID=${{ vars.TOOTBENDER_ID }} \
python download.py
- name: Upload Charts to Pixeldrain
run: PIXELDRAIN_KEY=${{ secrets.PIXELDRAIN_KEY}} python upload.py
- name: Export to CSV
run: python to_csv.py
- name: Commit Changes
run: |
git config --global user.email "actions@github.com"
git config --global user.name "Update Database Action"
git commit -am "Update Database" || exit 0
git push
- name: Upload to the Internet Archive
run: |
S3_ACCESS_KEY=${{ secrets.S3_ACCESS_KEY }} \
S3_SECRET_KEY=${{ secrets.S3_SECRET_KEY }}