ci: fix SIGPIPE (exit 141) in pipefail run steps on Linux
Build Talos CM5 Image / build (push) Failing after 13m49s
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user