Skip to content

don't update contributors list on the webserver (#396) #33

don't update contributors list on the webserver (#396)

don't update contributors list on the webserver (#396) #33

name: Update Contributors
# Schedule: Runs at midnight on the first day of each month
on:
push:
branches:
- gh-pages
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # At 00:00 UTC on the 1st of every month
jobs:
update-contributors:
runs-on: ubuntu-22.04
steps:
# Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v3
# Run the update script
- name: Setup venv and install pyyaml
run: |
pip install pyyaml requests
- name: Run update-contributors script
env:
API_KEY: ${{secrets.API_KEY}}
run: |
cd etc
python update-contributors.py
cd ..
# Configure Git for the PR
- name: Set up Git
run: |
git config user.name "contributor-list[bot]"
git config user.email "contributor-list[bot]@users.noreply.github.com"
# Commit the changes
- name: Commit Changes
run: |
git add _data/people_list.yml
git commit -m "Update contributors on $(date +'%Y-%m-%d')" || ${echo "No changes to commit" && false}
# Create a pull request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Update contributors on $(date +'%Y-%m-%d')"
branch: update-contributors
title: "Update contributors"
body-path: summary.txt
base: gh-pages