Skip to content

Commit

Permalink
yaml to store traffic of repository
Browse files Browse the repository at this point in the history
  • Loading branch information
vot4anto committed Sep 12, 2024
1 parent e8347ba commit 87656d3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/traffic_upload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Traffic Statistics
on:
schedule:
# runs once a week on sunday
# - cron: "55 23 * * 0"
- cron: "* 21 * * *"

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

# 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@v4
with:
ref: "traffic"

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

# Commits files to repository
- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
author_name: Santiago Gonzalez
message: "GitHub traffic"
add: "./traffic/*"
ref: "traffic" # commits to branch "traffic"

0 comments on commit 87656d3

Please sign in to comment.