-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (27 loc) · 887 Bytes
/
Copy pathtranding.yml
File metadata and controls
32 lines (27 loc) · 887 Bytes
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
name: Trending ranking
on:
workflow_dispatch:
permissions:
contents: write
jobs:
trending:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build trending ranking
run: make trending
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add data/trending.json data/trending.csv docs/data/trending.json docs/data/trending.csv data/[0-9][0-9][0-9][0-9]/
if git diff --cached --quiet; then
echo "No trending changes to commit"
exit 0
fi
SNAPSHOT_DATE="$(date -u +%F)"
git commit -m "Update trending ranking ${SNAPSHOT_DATE}"
git push