feat(build-push-sign-images): collapsible coloured logs + Apache-2.0 header fix #4

Merged
robin.everaars merged 2 commits from feat/bpsi-quiet-colored-logs into main 2026-07-18 09:38:06 +00:00

Two changes to the build-push-sign-images action.

1. fix: SPDX header to Apache-2.0

The Apache-2.0 relicense (#3) merged just after this action landed (#2) and did
not sweep the new file, so its header still declared
LicenseRef-HOISTIT-Proprietary-1.0, whose licence text the relicense removed.
reuse lint passes again.

2. feat: collapsible, coloured, structured logs

The nix copy/build output was a flat wall. Now:

  • Each phase (store prep, each image's build/push/sign, each mid-loop gc) is
    wrapped in a collapsible ::group::. Forgejo renders these as fold sections,
    like the Azure DevOps collapsible sections, so a run reads as one folded group
    per image.
  • Banners and the OK/FAIL lines are coloured (honours NO_COLOR).
  • A coloured N/M succeeded summary at the end.
  • On failure the target's full captured log is re-printed expanded, outside its
    group, with an ::error::, so the failed run's full log is visible without
    expanding anything.
  • New log-groups input (default true); set false for flat output.

The build itself is unchanged: same disk discipline (upfront gc, gc-rooted sign
toolchain, per-image gc under threshold), same per-image continue-on-error with
a fail-closed exit, same push-then-sign order.

Verification

  • reuse lint: compliant. shellcheck -s bash on the run body: clean.
  • Drove the loop end-to-end with a mock nix in both modes: continue-on-error
    (a mid-list failure does not stop the rest), fail-closed exit 1, the full
    failed log re-printed, all-success exit 0, and the tag-mismatch warning.

Once merged, the action is ready to tag v0.4.0 (which toolbox#46 references).

Two changes to the `build-push-sign-images` action. ## 1. fix: SPDX header to Apache-2.0 The Apache-2.0 relicense (#3) merged just after this action landed (#2) and did not sweep the new file, so its header still declared `LicenseRef-HOISTIT-Proprietary-1.0`, whose licence text the relicense removed. `reuse lint` passes again. ## 2. feat: collapsible, coloured, structured logs The nix copy/build output was a flat wall. Now: - Each phase (store prep, each image's build/push/sign, each mid-loop gc) is wrapped in a collapsible `::group::`. Forgejo renders these as fold sections, like the Azure DevOps collapsible sections, so a run reads as one folded group per image. - Banners and the OK/FAIL lines are coloured (honours `NO_COLOR`). - A coloured `N/M succeeded` summary at the end. - On failure the target's full captured log is re-printed expanded, outside its group, with an `::error::`, so the failed run's full log is visible without expanding anything. - New `log-groups` input (default `true`); set `false` for flat output. The build itself is unchanged: same disk discipline (upfront gc, gc-rooted sign toolchain, per-image gc under threshold), same per-image continue-on-error with a fail-closed exit, same push-then-sign order. ## Verification - `reuse lint`: compliant. `shellcheck -s bash` on the run body: clean. - Drove the loop end-to-end with a mock `nix` in both modes: continue-on-error (a mid-list failure does not stop the rest), fail-closed `exit 1`, the full failed log re-printed, all-success `exit 0`, and the tag-mismatch warning. Once merged, the action is ready to tag `v0.4.0` (which toolbox#46 references).
The Apache-2.0 relicense (#3) merged after this action landed (#2) and did not
sweep the new file, so build-push-sign-images/action.yml still declared
LicenseRef-HOISTIT-Proprietary-1.0, whose licence text the relicense removed.
Align the header with the repository licence so `reuse lint` passes again.
Wrap each phase (store prep, each image build/push/sign, each mid-loop gc) in a
collapsible `::group::` so the verbose nix copy/build output folds away, and
colour the banners plus the OK/FAIL lines (honours NO_COLOR). A run now reads as
one folded group per image plus a coloured "N/M succeeded" summary.

On failure the target's full captured log is re-printed expanded, outside its
group, with an `::error::`, so a failed run shows the complete log without
expanding anything. A new `log-groups` input (default true) turns grouping off
for flat output.

Behaviour is otherwise unchanged: the same disk discipline, the same per-image
continue-on-error with a fail-closed exit and the same push-then-sign order.
Verified locally by driving the loop with a mock nix (both modes, forced
failure, all-success and the tag-mismatch warning).
robin.everaars deleted branch feat/bpsi-quiet-colored-logs 2026-07-18 09:38:07 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
HOIST-IT-Actions/actions!4
No description provided.