ci: aggregate per-cell asset manifests into armbian-sdk-images.json#13
Merged
Conversation
6ed33ba to
65c26d1
Compare
The build action (armbian/build PR #9772) now writes a per-cell `assets-<board>-<release>-<branch>-<ui>.json` next to each Matrix cell's image upload. With 8 cells (board × os × extension) the release ends up with 8 small JSONs and one logical inventory split across them. Add a final Aggregate job that runs after Matrix completes, downloads every `assets-*.json` from the release, and merges them into a single `armbian-sdk-images.json` uploaded back to the same release. Downstream consumers (and the central index server at github.armbian.com) get one canonical inventory file per release instead of having to enumerate per-cell fragments. The existing per-cell manifests are left in place so individual cells remain inspectable; only the merged file is created on top. `if: always() && !cancelled()` lets the aggregator still merge manifests for the cells that did succeed when one matrix cell fails — fail-fast: false is already set on the Matrix strategy.
…-URL manifest Two changes that go together: 1. Switch the action ref from `armbian/build@main` to `armbian/build@action-release-assets-manifest` so this PR's aggregator can be tested end-to-end against the unmerged manifest feature in armbian/build#9772. Reverts to @main once #9772 lands. 2. Set `armbian_download_base_url` to the GitHub release URL for this run, and `armbian_download_repository` to empty. Empty repository selects the flat URL shape '<base>/<filename>' (added in #9772) instead of the dl.armbian.com '<base>/<board>/<repo>/ <filename>' shape, and clears the redi_url* fields since GitHub releases have no friendly-redirect convention. Result: per-cell manifests now carry the *actual* download URL for SDK images instead of an aspirational dl.armbian.com path.
Pre-existing typo (double 't') made the SDK release title silently fall back to the build action's default 'Armbian image' instead of 'Armbian SDK'. Surfaced as a GitHub Actions warning: Warning: Unexpected input(s) 'armbian_release_tittle', valid inputs are [..., 'armbian_release_title', ...] Same fix in the inline comment.
Pairs with the build action's switch from one combined manifest per
matrix cell to one manifest per image file. Per-cell naming
('assets-<board>-<release>-<branch>-<ui>.json') collided when two
matrix cells differed only in their extension list (e.g. one adds
image-output-qcow2, the other doesn't) — both wrote the same name
and the later upload silently overwrote the earlier.
Per-image naming ('<image_filename>.assets.json') is guaranteed
unique across cells because image filenames are. The aggregator
just needs the matching glob.
Match the canonical name used by the central index at github.armbian.com/armbian-images.json so consumers can use the same filename across sources. Was applied previously but lost during a branch cleanup; reapplying.
d4a5561 to
1eb0fcf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pairs with
armbian/build#9772, which makes the compositearmbian/build@mainaction emit a per-cellassets-<board>-<release>-<branch>-<ui>.jsonnext to every image upload.This SDK matrix runs 8 parallel cells (board × os × extension) into a single GitHub release tagged
${{ github.run_id }}. With #9772 each cell will already write its own manifest fragment to that release. This PR adds a follow-upAggregatejob that merges them into a singlearmbian-sdk-images.json.What it does
After
Matrixfinishes:gh release downloadpulls everyassets-*.jsonattached to the run-id release.jq -s 'map(.assets) | flatten | {assets: .}'merges them into one{assets: [...]}document.armbian-sdk-images.json(--clobberso re-runs replace it).if: always() && !cancelled()keeps the aggregator running when one matrix cell fails (the matrix already hasfail-fast: false), so partial inventories still publish.Test plan
assets-*.json(one per matrix cell)armbian-sdk-images.jsonjq '.assets | length' armbian-sdk-images.jsonshould equal the sum of.assets | lengthacross the per-cell files.