Merge pull request #116 from pythonindia/schedule-update-2 #88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Contributors | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: # Allows manual trigger of the workflow | |
jobs: | |
update-contributors: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: pip install requests | |
- name: Update README.md with contributors | |
run: python update_contributors.py | |
- name: Check for changes and commit | |
run: | | |
if git diff --quiet; then | |
echo "No changes to commit"; | |
else | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git add README.md | |
git commit -m 'Update contributors' | |
git push | |
fi |