Skip to content

Commit

Permalink
Add Action to periodically generate list of community contributors (#84)
Browse files Browse the repository at this point in the history
Add an Action to periodically scrape GitHub API for community contributors, update the list of contributors, and PR any changes
  • Loading branch information
GeckoEidechse authored Aug 1, 2024
1 parent a428a9e commit 653fe9e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/periodic-scrape.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Periodically scrape repos

on:
workflow_dispatch: # Manual run
schedule:
- cron: '0 0 * * 0'

jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install depenencies
run: pip install requests

- name: Run Python script for scraping
run: |
cd scripts
python scrape-for-contributors.py
- name: Check for changes
id: git_diff
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
if git diff-index --quiet HEAD; then
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: ${{ steps.git_diff.outputs.changes == 'true' }}
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Update community contributors list"
branch: automated/update-community-contributes
title: "Update community contributors list"
body: "Updates the list of community contributors"

0 comments on commit 653fe9e

Please sign in to comment.