.github/workflows/traffic.yml #207
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
schedule: | |
# runs once a week on sunday | |
- cron: "55 23 * * 0" | |
push: | |
branches: [ master ] | |
paths: | |
- '.github/workflows/traffic.yml' | |
jobs: | |
# This workflow contains a single job called "traffic" | |
traffic: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Check we are not on a fork | |
if: github.repository == 'isl-org/OpenBot' | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Gets the old traffic from last successful artifact | |
- name: Download old traffic | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: traffic.yml | |
workflow_conclusion: success | |
name: traffic | |
path: ./traffic/ | |
# Calculates traffic and clones based on Github insights and stores in CSV file | |
- name: Get new traffic | |
uses: sangonzal/[email protected] | |
env: | |
TRAFFIC_ACTION_TOKEN: ${{ secrets.GH_TOKEN }} | |
# Uploads new traffic as artifact | |
- name: Upload new traffic | |
uses: actions/upload-artifact@v4 | |
with: | |
name: traffic | |
path: ./traffic/ |