-
-
Notifications
You must be signed in to change notification settings - Fork 12
55 lines (46 loc) · 1.34 KB
/
fetch-daily.yml
File metadata and controls
55 lines (46 loc) · 1.34 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
45
46
47
48
49
50
51
52
53
54
55
name: Fetch GitHub Users Daily
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
fetch-users:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout main branch
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.14.2'
architecture: 'x64'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Run fetch.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
APP_ENV=production python fetch.py
- name: Run render.py
run: |
python render.py
- name: Check for changes
id: changes
run: |
if git diff --quiet docs/; then
echo "has_changes=false" >> "$GITHUB_OUTPUT"
else
echo "has_changes=true" >> "$GITHUB_OUTPUT"
fi
- name: Commit and push changes
if: steps.changes.outputs.has_changes == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/
git commit -m "chore: daily update of GitHub faces data"
git push origin main