Added stats updator functionality w. GH actions

This commit is contained in:
Lucas
2025-04-06 11:26:20 -07:00
parent abc726b3a0
commit 2597c3bfd9
6 changed files with 1819 additions and 506 deletions

37
.github/workflows/update-stats.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Update Applications Metadata
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Every day at midnight UTC
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Run update script
env:
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }}
run: |
python .source/scripts/maintenance/stats_updator.py
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add source/data/applications.json
git commit -m "Auto-update GitHub metadata" || echo "No changes to commit"
git push