traffic-metrics #61
Workflow file for this run
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
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" |