Use only main's data and announcement artifacts for deploys and staging
deploy.yaml and staging-aggregate.yaml downloaded the newest data-artifact from any branch (search_artifacts: true, no branch filter). A manual test run of data-processing.yml on an unreviewed branch could therefore feed the live site, as it did on 3 November (#960).
Changes
- Artifact downloads: in
deploy.yaml(data and announcements), thedawidd6/action-download-artifactsearches now addbranch: main. Instaging-aggregate.yaml(data) the filter ismaintoo, unless a manual run sets the newdata_branchinput. - Staging a pipeline change: run
data-processing.ymlon the branch, then dispatchstaging-aggregate.yamlwithdata_branch: <branch>, optionally withsingle_pr. Staging uses that branch'sdata-artifact-preview, the name #1059 gives branch runs; production never does. If that branch has no artifact, the staging run stops with an error instead of quietly usingmain's data. - Missing-artifact fallback: in both files, it now always dispatches
data-processing.ymlonmain, not on the current ref.- It also now fires at all. The first download used
if_no_artifact_found: warn, which succeeds, so the fallback, which needs a failure, never ran. It is nowfail, with the existingcontinue-on-error. - While waiting, it only follows runs created after its own dispatch (
created>=filter), so it can't pick up an older or unrelatedmainrun.
- It also now fires at all. The first download used
- Docs:
.github/workflows/README.mdsays that branch artifacts are ignored, and how to try one locally.
Unchanged:
link-check.yamldownloadsdeploy.yaml's output, which only runs onmain.- Retries by run ID, and everything else in the workflows.
Merge order: merge #1059 (#1030) first. It renames branch-run artifacts to *-preview and owns the create_announcements.yml changes, which this PR no longer touches.
Related
- #1030 stops branch dispatches writing to
build-resources. It is separate and touchesdata-processing.ymlonly. - On
rebrand-doors,deploy.yaml,staging-aggregate.yamlandcreate_announcements.ymlare identical tomain's, so the Doors merge keeps this change. rebrand-preview.yaml, onrebrand-doorsonly, gets the same filter in a separate PR.
Review: Sol checked the branch filter against the source of both pinned versions of the download action, and raised the fallback and retry problems fixed above. Its other finding, that branch runs can still write cached contributor-analysis files to build-resources, which main runs then re-upload, belongs to #1030.
Verified: all three files parse as YAML. The branch input is the action's documented run filter, used alongside search_artifacts. Workflow runs can't be exercised locally, so the first main deploy after merging is the live check: its "Try to download data artifact" log should name a run whose head branch is main.
Fixes #960
š¤ Generated with Claude Code