Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 35 additions & 27 deletions .github/workflows/aztec-starter-traffic.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,45 @@
name: Log aztec-starter traffic

on:
schedule:
# runs once a week on sunday
- cron: "55 23 * * 0"
schedule:
# ⏱️ CLEANUP: Runs once a week on Sunday, precisely at 00:00 UTC.
- cron: "0 0 * * 0"
workflow_dispatch:

jobs:
# This workflow contains a single job called "traffic"
aztec-starter-traffic:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# 🛡️ PERMISSION: Grant explicit write permission for the job.
# This is a best practice, even when an external token is used.
permissions:
contents: write

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
token: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
# 🚀 UPGRADE: Use the latest stable checkout version (@v4).
# Uses the default GITHUB_TOKEN for cloning (read access).
- uses: actions/checkout@v4
with:
token: ${{ secrets.TRAFFIC_ACTION_TOKEN }}


# Calculates traffic and clones and stores in CSV file
- name: GitHub traffic
uses: sangonzal/[email protected]
env:
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
REPOSITORY_NAME: "AztecProtocol/aztec-starter"

# Commits files to repository
- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
author_name: Josh Crites
message: "aztec-starter GitHub traffic"
add: "./traffic/*"
ref: "traffic-aztec-starter"
# Calculates traffic and clones and stores in CSV file
- name: GitHub traffic
uses: sangonzal/[email protected]
env:
# Custom token used here for API call access (requires 'repo' scope).
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
REPOSITORY_NAME: "AztecProtocol/aztec-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: github-actions[41898282+github-actions[bot]@users.noreply.github.com]
message: "docs(traffic): update aztec-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 (using the same branch checked out).
ref: "traffic-aztec-starter" # Keep the original dedicated branch intent