mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
Three inline `run:` blocks moved into `scripts/github/runner/`:
* `images_build_outputs.sh "$distros" "$image_tag"` — replaces the
matrix/image_tag computation in the "Compute matrix JSON" step; emits
both outputs to $GITHUB_OUTPUT in one call.
* `distros_matrix.sh "$distros"` — the matrix-JSON primitive
(`split(" ") | map(select(length>0))`), reused by test-dns.yml's
matrix step. Removes the jq duplicate that lived in both workflows.
* The two pre/post-build `Disk pressure` steps now invoke the already-
existing `disk_pressure_report.sh PRE-BUILD` / `POST-BUILD` instead of
duplicating the df/docker-system-df/buildx-du block inline.
Behaviour unchanged; the workflow runs the same commands via the SPOT
helpers.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 lines
394 B
Bash
Executable File
13 lines
394 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Emit a JSON array matrix from a space-separated distro list. Used by
|
|
# images-build-ci and test-dns workflows to feed the matrix strategy.
|
|
#
|
|
# Usage:
|
|
# distros_matrix.sh "arch debian ubuntu"
|
|
# echo "matrix=$(distros_matrix.sh "${INPUT}")" >> "$GITHUB_OUTPUT"
|
|
set -euo pipefail
|
|
|
|
distros="${1:-}"
|
|
printf '%s' "${distros}" | jq -Rc 'split(" ") | map(select(length>0))'
|