Skip to content

ci: aggregate per-cell asset manifests into armbian-sdk-images.json#13

Merged
igorpecovnik merged 5 commits into
mainfrom
sdk-images-manifest
May 6, 2026
Merged

ci: aggregate per-cell asset manifests into armbian-sdk-images.json#13
igorpecovnik merged 5 commits into
mainfrom
sdk-images-manifest

Conversation

@igorpecovnik
Copy link
Copy Markdown
Member

Summary

Pairs with armbian/build #9772, which makes the composite armbian/build@main action emit a per-cell assets-<board>-<release>-<branch>-<ui>.json next 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-up Aggregate job that merges them into a single armbian-sdk-images.json.

What it does

After Matrix finishes:

  1. gh release download pulls every assets-*.json attached to the run-id release.
  2. jq -s 'map(.assets) | flatten | {assets: .}' merges them into one {assets: [...]} document.
  3. The merged file is uploaded back to the release as armbian-sdk-images.json (--clobber so re-runs replace it).
  4. The per-cell fragments are left in place — individual cells stay inspectable; the merged file is purely additive on top.

if: always() && !cancelled() keeps the aggregator running when one matrix cell fails (the matrix already has fail-fast: false), so partial inventories still publish.

Test plan

  • After both PRs land, trigger the SDK workflow and confirm the resulting GitHub release contains:
    • 8 per-cell assets-*.json (one per matrix cell)
    • 1 merged armbian-sdk-images.json
  • jq '.assets | length' armbian-sdk-images.json should equal the sum of .assets | length across the per-cell files.
  • Force a single matrix cell to fail; aggregator should still publish a manifest covering the cells that succeeded.

@igorpecovnik igorpecovnik force-pushed the sdk-images-manifest branch 3 times, most recently from 6ed33ba to 65c26d1 Compare May 6, 2026 09:14
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.
@igorpecovnik igorpecovnik force-pushed the sdk-images-manifest branch from d4a5561 to 1eb0fcf Compare May 6, 2026 09:19
@igorpecovnik igorpecovnik merged commit 404e21a into main May 6, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant