Skip to content

Commit ab5399f

Browse files
committed
.github/update-downstream-repos: dedup matrix by repo
We should only be keeping a single copy of the vendored repo in each downstream repo, so deduplicate the matrix by repo. In cases where there are multiple copies, we are prioritizing the `nextstrain/shared` remote since that is the newer version. This is prompted by the error in the workflow when avian-flu had two paths to update. <#73 (comment)>
1 parent ada3160 commit ab5399f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎.github/workflows/update-downstream-repos.yaml‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@ jobs:
5050
})
5151
')
5252
53-
# There should not be any overlap between `shared_matrix` and `ingest_matrix`
54-
# but deduplicating with `unique` just in case.
55-
# -Jover, 14 Apr 2026.
53+
# Deduplicate by repo since each repo should only have a single copy
54+
# of the vendored repo. In cases where a repo has both,
55+
# we are prioritizing the nextstrain/shared remote since that is
56+
# the newer repo.
57+
# -Jover, 15 Apr 2026.
5658
matrix=$(jq -n \
5759
--argjson matrix1 "$shared_matrix" \
5860
--argjson matrix2 "$ingest_matrix" \
59-
-c '$matrix1 + $matrix2 | sort_by(.repo, .path) | unique')
61+
-c '$matrix1 + $matrix2 | unique_by(.repo)')
6062
6163
echo "downstream-matrix=$matrix" | tee -a "$GITHUB_OUTPUT"
6264
update-downstream:

0 commit comments

Comments
 (0)