ci: fix SIGPIPE (exit 141) in pipefail run steps on Linux
Build Talos CM5 Image / build (push) Failing after 13m49s

bash -eo pipefail turns `cmd | head -1` into a failure when head closes
the pipe early (SIGPIPE). Surfaced as exit 141 on the arm64 runner.

- build.yaml: drop `| head -1` on `make --version`; use `find -print -quit`
  for the disk image instead of `find | head -1`
- auto-update.sh: `sed ... | head -1` -> `... | awk 'NR==1'` (reads to EOF)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mathias Beaulieu-Duncan
2026-06-16 10:03:32 -04:00
parent 238a814d61
commit 2b009aaeee
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ jobs:
curl -fsSL https://github.com/jqlang/jq/releases/latest/download/jq-linux-arm64 -o "$HOME/.local/bin/jq"
chmod +x "$HOME/.local/bin/jq"
fi
make --version | head -1
make --version
crane version || true
- name: Set up Docker Buildx
@@ -82,7 +82,7 @@ jobs:
- name: Compress disk image
run: |
# The imager outputs to checkouts/talos/_out/
DISK_IMAGE=$(find checkouts/talos/_out -name 'metal-arm64*.raw*' | head -1)
DISK_IMAGE=$(find checkouts/talos/_out -name 'metal-arm64*.raw*' -print -quit)
if [ -z "$DISK_IMAGE" ]; then
echo "Error: disk image not found in checkouts/talos/_out/"
find checkouts/talos/_out -type f
+3 -3
View File
@@ -109,9 +109,9 @@ NEW_TAG="${TAG_PREFIX}-${NEXT_BUILD}"
# ── Update README badges and examples ───────────────────────────────
README="README.md"
if [ -f "$README" ]; then
OLD_TALOS=$(sed -n 's/.*talos-v\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' "$README" | head -1)
OLD_KERNEL=$(sed -n 's/.*kernel-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' "$README" | head -1)
OLD_TAG=$(sed -n 's/.*\(v[0-9]*\.[0-9]*\.[0-9]*-k[0-9]*\.[0-9]*\.[0-9]*-[0-9]*\).*/\1/p' "$README" | head -1)
OLD_TALOS=$(sed -n 's/.*talos-v\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' "$README" | awk 'NR==1')
OLD_KERNEL=$(sed -n 's/.*kernel-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' "$README" | awk 'NR==1')
OLD_TAG=$(sed -n 's/.*\(v[0-9]*\.[0-9]*\.[0-9]*-k[0-9]*\.[0-9]*\.[0-9]*-[0-9]*\).*/\1/p' "$README" | awk 'NR==1')
echo "Updating README: talos v${OLD_TALOS} → v${TALOS_VER}, kernel ${OLD_KERNEL}${KERNEL_VER}, tag ${OLD_TAG}${NEW_TAG}" >&2