-
Notifications
You must be signed in to change notification settings - Fork 54
45 lines (39 loc) · 1.67 KB
/
noir-starter-traffic.yml
File metadata and controls
45 lines (39 loc) · 1.67 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
name: Log noir-starter traffic
on:
schedule:
# ⏱️ CLEANUP: Runs once a week on Sunday, precisely at 00:00 UTC.
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
noir-starter-traffic:
runs-on: ubuntu-latest
# 🛡️ PERMISSION: Grant explicit write permission for the commit step.
permissions:
contents: write
steps:
# 🚀 UPGRADE: Use the latest stable checkout version (@v4).
# The custom token is used here mainly for checking out (in case of private repo)
# and will be reused by the commit action for pushing.
- uses: actions/checkout@v4
with:
token: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
# Calculates traffic and stores it in CSV file
- name: GitHub traffic
uses: sangonzal/[email protected]
env:
# Custom token used here for reading the traffic API (requires 'repo' scope).
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
REPOSITORY_NAME: "noir-lang/noir-starter"
# Commits files to repository
- name: Commit changes
uses: EndBug/add-and-commit@v9 # Use the latest stable version
with:
# 🤖 CONSISTENCY: Use the official GitHub Actions Bot identity.
author_name: github-actions[bot]
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: "docs(traffic): update noir-starter GitHub traffic data"
add: "./traffic/*"
# 🔑 SECURITY: Pass the custom token explicitly for push access.
token: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
# The branch to commit to.
ref: "traffic-noir-starter"