From 68d7c22b7c54430ec9e54573cee97e11da3eb66f Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidoS@users.noreply.github.com> Date: Wed, 9 Apr 2025 16:02:53 -0500 Subject: [PATCH] [NAK_CVR_Mods] Experiment 2 --- .github/workflows/update-modlist.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/update-modlist.yml b/.github/workflows/update-modlist.yml index 73d8919..2b117fb 100644 --- a/.github/workflows/update-modlist.yml +++ b/.github/workflows/update-modlist.yml @@ -1,34 +1,35 @@ -name: Update Mod List in README +name: Update Mod List on: push: paths: - - '**/README.md' + - 'scripts/update_modlist.py' - '.github/workflows/update-modlist.yml' + - 'README.md' + - '**/README.md' workflow_dispatch: jobs: - update-readme: + update-modlist: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v3 + - name: Set up Python + uses: actions/setup-python@v5 with: - node-version: '20' + python-version: '3.x' - - name: Install dependencies - run: npm install gray-matter + - name: Run mod list updater + run: python scripts/update_modlist.py - - name: Generate mod list - run: node .github/scripts/update-modlist.js - - - name: Commit changes + - 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