jRandomSkills/.github/workflows/update_thanks.yml
2026-06-10 14:00:02 +02:00

40 lines
No EOL
1 KiB
YAML

name: Update Contributors & Thanks
on:
pull_request:
types: [closed]
workflow_dispatch:
jobs:
update:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: pip install requests python-dotenv
- name: Run update script
env:
DISCORD_USER_IDS: ${{ vars.DISCORD_USER_IDS }}
EXTRA_USERS_GITHUB: ${{ vars.EXTRA_USERS_GITHUB }}
run: python .github/update_thanks.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 README.md README-PL.md .github/avatars/
git diff --cached --quiet || git commit -m "chore: update contributors and thanks"
git push