DOC: Document code contributors on website #3
Workflow file for this run
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: Contributor credit | |
on: # yamllint disable-line rule:truthy | |
schedule: | |
- cron: '0 0 1 * *' # first day of the month | |
# TODO: Remove this before merging the PR! | |
pull_request: | |
branches: | |
- main | |
permissions: | |
pull-requests: write | |
jobs: | |
update_credit: | |
name: Update | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- run: pip install pygithub -e . | |
- run: git checkout -b credit | |
- run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python tools/dev/update_credit_json.py | |
- run: python tools/dev/update_credit_rst.py | |
- run: git add -f doc/sphinxext/prs/*.json | |
- run: | | |
git status --porcelain | |
if [[ $(git status --porcelain) ]]; then | |
echo "dirty=true" >> $GITHUB_OUTPUT | |
fi | |
id: status | |
- run: | | |
git commit -am "MAINT: Update code credit" | |
gh pr create -B main -H credit --title "MAINT: Update code credit" --body "Created by ${{ github.workflow.file }}" --label "no-changelog-entry-needed" | |
if: steps.status.outputs.dirty == 'true' |