-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.1 KB
/
review_audit.yml
File metadata and controls
45 lines (36 loc) · 1.1 KB
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
43
44
name: Review Audit Collection
on:
schedule:
# Run nightly at 2 AM UTC
- cron: '0 2 * * *'
workflow_dispatch: # Allow manual trigger
jobs:
collect-reviews:
runs-on: ubuntu-latest
permissions:
contents: write
issues: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PyGithub>=2.1.0
- name: Run audit script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python Scripts/audit_reviews.py
- name: Commit and push if changed
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs/audit/reviews.json
git diff --staged --quiet || (git commit -m "Auto-update audit reviews [skip ci]" && git push)