-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.08 KB
/
traffic-dashboard.yml
File metadata and controls
39 lines (33 loc) · 1.08 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
name: Traffic Dashboard
on:
workflow_dispatch:
schedule:
- cron: "15 3 * * *"
permissions:
contents: write
jobs:
update-traffic:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update traffic history and README
run: node scripts/update-traffic-readme.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TRAFFIC_TOKEN: ${{ secrets.TRAFFIC_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
README_PATH: README.md
HISTORY_PATH: .github/traffic/history.json
TRACKING_START_DATE: "2026-02-12"
- name: Commit and push changes
run: |
if git diff --quiet; then
echo "No traffic changes to commit."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add README.md .github/traffic/history.json
git commit -m "chore: update traffic dashboard"
git push