Skip to content

pkg: uv 0.8.4 + update-contributors action on script change #5

pkg: uv 0.8.4 + update-contributors action on script change

pkg: uv 0.8.4 + update-contributors action on script change #5

name: Update Contributors
on:
push:
paths:
- 'CONTRIBUTORS.md'
- '.github/scripts/update_contributors.py'
pull_request:
paths:
- 'CONTRIBUTORS.md'
- '.github/scripts/update_contributors.py'
jobs:
update-contributors:
runs-on: ubuntu-latest
permissions:
contents: write # Needed to push commits
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed for pushing changes
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v6
with:
version: "0.8.4"
python-version: ${{ matrix.python-version }}
- name: Run script
id: run-script
run: |
uv -v run .github/scripts/update_contributors.py
- name: Commit and push changes if needed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Only commit if file changed
if ! git diff --quiet docs/src/contributors.rst; then
git add docs/src/contributors.rst
git commit -s -m "[gh-action] Update contributors.rst [skip ci]"
git push
fi