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 ]" ] } }