NAK_CVR_Mods/.github/workflows/update-modlist.yml
2025-04-09 16:02:53 -05:00

35 lines
964 B
YAML

name: Update Mod List
on:
push:
paths:
- 'scripts/update_modlist.py'
- '.github/workflows/update-modlist.yml'
- 'README.md'
- '**/README.md'
workflow_dispatch:
jobs:
update-modlist:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Run mod list updater
run: python scripts/update_modlist.py
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}
git add README.md
git commit -m "[NAK_CVR_Mods] Update mod list in README" || echo "No changes to commit"
git push