traffic-metrics #62
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@v3 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
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 export and GitHub metrics scripts | |
run: | | |
for ORG in ${{ env.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: Commit Files | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "Update aggregated metrics" | |
commit_user_name: "Saikrishna Bairamoni" | |
commit_user_email: "saikrishna.bairamoni@leidos.com" |