Skip to content

Full repository integrity and recovery hardening #21

Full repository integrity and recovery hardening

Full repository integrity and recovery hardening #21

Workflow file for this run

name: Refresh Know the Gulf research dataset
on:
workflow_dispatch:
push:
branches: [main]
paths:
- '.github/workflows/daily-refresh.yml'
- '.github/recovery/daily_research.trigger'
- 'scripts/build_daily_flags.py'
- 'scripts/update_environment.py'
- 'scripts/build_model_dataset.py'
- 'scripts/write_workflow_health.py'
- 'scripts/validate_data.py'
- 'tests/**'
schedule:
- cron: '23 5 * * *'
timezone: 'America/Chicago'
permissions:
contents: write
concurrency:
group: knowthegulf-core-data-write
cancel-in-progress: false
jobs:
refresh:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: pip
- run: pip install -r requirements.txt
- run: python scripts/build_daily_flags.py
- run: python scripts/update_environment.py
- run: python scripts/build_model_dataset.py
- run: python scripts/validate_data.py
- run: pytest -q
- name: Record daily research success heartbeat
run: python scripts/write_workflow_health.py --workflow "Refresh Know the Gulf research dataset" --output data/workflow_health/daily_research.json
- name: Commit only daily-research owned paths
run: |
owned_paths=(
data/flag_observations_master.csv
data/flag_observations_master.json
data/flag_daily_master.csv
data/flag_daily_master.json
data/flag_summary.json
data/environmental_daily.csv
data/model_training.csv
data/model_metrics.json
data/workflow_health/daily_research.json
)
if [[ -z "$(git status --porcelain -- "${owned_paths[@]}")" ]]; then
echo "No research-data changes to commit."; exit 0
fi
bash scripts/persist_paths.sh "data: daily weather wave tide and model refresh" "${owned_paths[@]}"
# Pages deployment is intentionally centralized in deploy-pages.yml.