Files
definitive-opensource-mustb…/.github/workflows/update-stats.yml
2026-01-22 21:49:34 -08:00

46 lines
1.1 KiB
YAML

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
defaults:
run:
working-directory: core
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: true
- name: Install UV
uses: astral-sh/setup-uv@v7
- name: Set up Python
run: uv python install
- name: Install project
run: uv sync --no-dev
- name: Run update script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: uv run source/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 data/dynamic/applications.json
git commit -m "Auto-update GitHub metadata" || echo "No changes to commit"
git push