Skip to content

Update Contributors #31

Update Contributors

Update Contributors #31

name: Update Contributors
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
update-contributors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Update contributors
env:
GITHUB_PAT: ${{ secrets.PAT }}
id: update
run: |
output=$(python .github/scripts/update_contributors.py)
echo "update_status=$output" >> $GITHUB_OUTPUT
- name: Commit and push if changed
if: steps.update.outputs.update_status == 'Contributors updated'
run: |
git config --local user.email "[email protected]"
git config --local user.name "0PandaDEV"
git add README.md
git commit -m "Update contributors" && git push