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

41 lines
No EOL
1.2 KiB
YAML

name: Update Contributors & Thanks
on:
pull_request:
types: [closed]
workflow_dispatch:
jobs:
update:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' || github.event_name == 'push'
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: ${{ secrets.DISCORD_USER_IDS }}
EXTRA_USERS_GITHUB: ${{ secrets.EXTRA_USERS_GITHUB }}
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
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