-
Notifications
You must be signed in to change notification settings - Fork 15
42 lines (36 loc) · 1.13 KB
/
periodic-scrape-reviews.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Periodically scrape reviews
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-reviews.py ${{ secrets.GITHUB_TOKEN }}
- 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 review counts"
branch: automated/update-reviewer-counts
title: "Update review counts"
body: "Updates the lists of review counts"