-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (37 loc) · 1.26 KB
/
traffic-metrics.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: traffic-metrics
env:
ORGS: usdot-fhwa-OPS usdot-fhwa-stol usdot-jpo-ode
on:
schedule:
- cron: "0 4 1 * *" # 1st of the month at 4AM
- cron: "0 4 15 * *" # 15th of the month at 4AM
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install -r traffic-metrics/requirements.txt
python -m pip install pandas # Ensure pandas is installed
- name: Run traffic-metrics
run: |
for ORG in $ORGS; do
python3 traffic-metrics/export_traffic.py -t ${{ secrets.METRICS_GITHUB_TOKEN }} -o "$ORG"
python3 traffic-metrics/github_metrics.py -t ${{ secrets.METRICS_GITHUB_TOKEN }} -o "$ORG"
done
- name: Fetch latest changes
run: git fetch origin develop
- name: Commit Files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update Traffic metrics"
commit_user_name: "Saikrishna Bairamoni"
commit_user_email: "saikrishna.bairamoni@leidos.com"