From b24e17f5f81c1620f1c526be2e3a1d6bf7a1d3c1 Mon Sep 17 00:00:00 2001 From: Ahmed Abushagur Date: Fri, 6 Mar 2026 01:56:15 -0800 Subject: [PATCH] fix: tarball workflow failures (root ownership, swapfile, hermes TTY) - Use sudo mv + chown for tarball in release step (root-owned from capture) - Skip swapfile creation if /swapfile already exists (GitHub Actions runners) - Tolerate hermes setup wizard failure when /dev/tty unavailable in CI Co-Authored-By: Claude Opus 4.6 --- .github/workflows/agent-tarballs.yml | 7 ++++--- packer/agents.json | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/agent-tarballs.yml b/.github/workflows/agent-tarballs.yml index dc1bafaaf..7ba0ee53d 100644 --- a/.github/workflows/agent-tarballs.yml +++ b/.github/workflows/agent-tarballs.yml @@ -113,7 +113,7 @@ jobs: fi echo "==> Running: ${cmd}" - sudo HOME=/root bash -c "${cmd}" + sudo HOME=/root bash -c "${cmd}" < /dev/null i=$((i + 1)) done @@ -134,8 +134,9 @@ jobs: DATE=$(date -u +%Y%m%d) TARBALL="spawn-agent-${AGENT_NAME}-x86_64-${DATE}.tar.gz" - # Move tarball to expected name - mv "/tmp/spawn-agent-${AGENT_NAME}.tar.gz" "${TARBALL}" + # Move tarball to expected name (tarball is owned by root from sudo capture) + sudo mv "/tmp/spawn-agent-${AGENT_NAME}.tar.gz" "${TARBALL}" + sudo chown "$(id -u):$(id -g)" "${TARBALL}" # Delete existing release if present (rolling release) gh release delete "${TAG}" --yes 2>/dev/null || true diff --git a/packer/agents.json b/packer/agents.json index 6080bf023..c0dd1748c 100644 --- a/packer/agents.json +++ b/packer/agents.json @@ -32,14 +32,14 @@ "zeroclaw": { "tier": "minimal", "install": [ - "fallocate -l 4G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile", + "if [ ! -f /swapfile ]; then fallocate -l 4G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile; fi", "curl -LsSf https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/a117be64fdaa31779204beadf2942c8aef57d0e5/scripts/bootstrap.sh | bash -s -- --install-rust --install-system-deps --prefer-prebuilt" ] }, "hermes": { "tier": "minimal", "install": [ - "curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash" + "curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash || [ -f ~/.local/bin/hermes ]" ] } }