From 2c0ae875836606cb66df36dbefc9617701205536 Mon Sep 17 00:00:00 2001 From: Anthony Kelani Date: Thu, 26 Mar 2026 16:42:57 -0700 Subject: [PATCH 1/2] Add weekly GitHub traffic calculation workflow This workflow runs weekly to calculate GitHub traffic, stores the data in a CSV file, and commits the changes to the 'traffic' branch. --- .github/workflows/workflow.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..01b9263 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,32 @@ +on: + schedule: + # runs once a week on sunday + - cron: "55 23 * * 0" + +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@v2 + with: + ref: "traffic" + + # Calculates traffic and clones and stores in CSV file + - name: GitHub traffic + uses: sangonzal/repository-traffic-action@v.0.1.6 + 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" From a1feb5241aadcc7b11f9d7ae00e0e9afbc338059 Mon Sep 17 00:00:00 2001 From: Anthony Kelani Date: Thu, 26 Mar 2026 16:56:32 -0700 Subject: [PATCH 2/2] Change commit author name to Traffic Bot --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 01b9263..2089057 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -26,7 +26,7 @@ jobs: - name: Commit changes uses: EndBug/add-and-commit@v4 with: - author_name: Santiago Gonzalez + author_name: Traffic Bot message: "GitHub traffic" add: "./traffic/*" ref: "traffic" # commits to branch "traffic"