mirror of
https://github.com/PlaneQuery/OpenAirframes.git
synced 2026-09-14 18:05:27 +02:00
fix: make bootstrapping a deliberate dispatch and list every asset released
Self-review of the two preceding commits. - the release body hardcoded one FAA basename while files: uploads every source by glob, so each release attached an asset it did not list; basenames are now derived the same way - allow_bootstrap was a standing matrix key on tc that nothing forced anyone to remove, so an outage longer than the release walk-back would have rebuilt from one day with a green run; it is now a workflow_dispatch input naming the one source permitted to bootstrap - the per-source glob excluded prefixes by substring while build_registry.py matches the source token exactly, so a future source named registry_* would have been dropped here and kept there; both now anchor on the same filename shape - README lists the Transport Canada asset, which the previous commit began publishing Generated-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,10 @@ on:
|
||||
description: 'Date to process (YYYY-MM-DD format, default: yesterday)'
|
||||
required: false
|
||||
type: string
|
||||
bootstrap_source:
|
||||
description: 'Onboarding only: the one source id permitted to rebuild from a single day'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -58,15 +62,14 @@ jobs:
|
||||
required: true
|
||||
- source: tc
|
||||
required: false
|
||||
# Transport Canada has never published an asset. Remove this once the first
|
||||
# run has succeeded: it exists to permit day one, not to paper over an outage.
|
||||
allow_bootstrap: true
|
||||
uses: ./.github/workflows/registry-source.yaml
|
||||
with:
|
||||
source: ${{ matrix.source }}
|
||||
date: ${{ inputs.date }}
|
||||
required: ${{ matrix.required }}
|
||||
allow_bootstrap: ${{ matrix.allow_bootstrap == true }}
|
||||
# Standing permission would also fire on an outage. A source bootstraps only when a
|
||||
# human dispatches the run naming it.
|
||||
allow_bootstrap: ${{ inputs.bootstrap_source == matrix.source }}
|
||||
|
||||
join-registry:
|
||||
needs: build-registry-source
|
||||
@@ -362,7 +365,7 @@ jobs:
|
||||
CSV_FILE_REGISTRY=$(find artifacts/faa -name "openairframes_registry_*.csv" -type f 2>/dev/null | head -1)
|
||||
# Every per-source registry CSV, whatever sources the matrix ran.
|
||||
SOURCE_CSVS=$(find artifacts/faa -name "openairframes_*.csv" -type f 2>/dev/null \
|
||||
| grep -v "openairframes_registry_" | grep -v "openairframes_community_" | sort)
|
||||
| grep -vE '/openairframes_(registry|community|adsb)_[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{4}-[0-9]{2}-[0-9]{2}\.csv$' | sort)
|
||||
echo "Per-source registry CSVs found:"
|
||||
echo "$SOURCE_CSVS"
|
||||
# Prefer concatenated file (with date range) over single-day file
|
||||
@@ -442,6 +445,11 @@ jobs:
|
||||
echo "source_csvs<<SOURCE_CSVS_EOF"
|
||||
echo "$SOURCE_CSVS"
|
||||
echo "SOURCE_CSVS_EOF"
|
||||
echo "source_basenames<<SOURCE_BASENAMES_EOF"
|
||||
echo "$SOURCE_CSVS" | while read -r f; do
|
||||
[ -n "$f" ] && echo "- $(basename "$f")"
|
||||
done
|
||||
echo "SOURCE_BASENAMES_EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
echo "csv_basename_registry=$(basename "$CSV_FILE_REGISTRY")" >> "$GITHUB_OUTPUT"
|
||||
echo "csv_basename_faa=$CSV_BASENAME_FAA" >> "$GITHUB_OUTPUT"
|
||||
@@ -491,7 +499,7 @@ jobs:
|
||||
Assets:
|
||||
- NOTICE (source terms; required for redistribution)
|
||||
- ${{ steps.meta.outputs.csv_basename_registry }}
|
||||
- ${{ steps.meta.outputs.csv_basename_faa }}
|
||||
${{ steps.meta.outputs.source_basenames }}
|
||||
${{ steps.meta.outputs.csv_basename_adsb && format('- {0}', steps.meta.outputs.csv_basename_adsb) || '' }}
|
||||
- ${{ steps.meta.outputs.csv_basename_community }}
|
||||
- ${{ steps.meta.outputs.zip_basename }}
|
||||
|
||||
Reference in New Issue
Block a user