Skip to content

enable git push from workflow #6

enable git push from workflow

enable git push from workflow #6

name: Update Contributors List
on:
push:
branches:
- NOREF_adjust_structure
jobs:
update-contributors:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Update README with contributors
run: python src/fetch_contributors.py
- name: Commit and push if changed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add README.md
git commit -m "Update contributors list" || exit 0
git push