Skip to content

Commit e73cf79

Browse files
authored
chore: init traffic action
1 parent ea4e6f5 commit e73cf79

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
schedule:
3+
# runs once a week on sunday
4+
- cron: "55 23 * * 0"
5+
6+
jobs:
7+
# This workflow contains a single job called "traffic"
8+
traffic:
9+
# The type of runner that the job will run on
10+
runs-on: ubuntu-latest
11+
12+
# Steps represent a sequence of tasks that will be executed as part of the job
13+
steps:
14+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
15+
- uses: actions/checkout@v2
16+
with:
17+
ref: "traffic"
18+
19+
# Calculates traffic and clones and stores in CSV file
20+
- name: GitHub traffic
21+
uses: sangonzal/repository-traffic-action@v0.1.3
22+
env:
23+
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
24+
25+
# Commits files to repository
26+
- name: Commit changes
27+
uses: EndBug/add-and-commit@v4
28+
with:
29+
author_name: Brooke White
30+
message: "Update GitHub traffic"
31+
add: "./traffic/*"
32+
ref: "traffic" # commits to branch "traffic"

0 commit comments

Comments
 (0)