62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
name: Update fiber data
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
states:
|
|
description: "Comma separated state codes like AZ,NM, or ALL. Blank uses the STATES variable."
|
|
required: false
|
|
default: ""
|
|
schedule:
|
|
- cron: "17 9 5 * *"
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "data/contracts/**"
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: update-data
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 340
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install
|
|
run: pip install -r scripts/requirements.txt
|
|
|
|
- name: Build
|
|
env:
|
|
FCC_USERNAME: ${{ secrets.FCC_USERNAME }}
|
|
FCC_API_TOKEN: ${{ secrets.FCC_API_TOKEN }}
|
|
STATES: ${{ github.event.inputs.states || vars.STATES || 'AZ' }}
|
|
EVENT: ${{ github.event_name }}
|
|
run: |
|
|
if [ "$EVENT" = "push" ]; then
|
|
python scripts/build_fcc.py --manifest-only
|
|
else
|
|
python scripts/build_fcc.py --states "$STATES"
|
|
fi
|
|
|
|
- name: Commit
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898341+github-actions[bot]@users.noreply.github.com"
|
|
git add -A data
|
|
if git diff --cached --quiet; then
|
|
echo "No changes"
|
|
exit 0
|
|
fi
|
|
git commit -m "Update fiber data"
|
|
git push
|