Skip to content

Commit 7ba1269

Browse files
committed
Fix action health check: remove curl -f flag from HEAD requests
The -f flag makes curl suppress output on 4xx responses. Since HEAD / returns 405 on existing releases, the Server header grep finds nothing and the startup loop times out after 30s. Removing -f lets curl output headers regardless of status code.
1 parent 1dd6c57 commit 7ba1269

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ runs:
8282
8383
# Check if spiceio is already listening on the requested address
8484
WANT_VERSION=$(spiceio --version | awk '{print $2}')
85-
RUNNING_HEADER=$(curl -sf -I "http://${SPICEIO_BIND}/" 2>/dev/null | grep -i '^server:.*spiceio' | tr -d '\r' || true)
85+
RUNNING_HEADER=$(curl -s -I "http://${SPICEIO_BIND}/" 2>/dev/null | grep -i '^server:.*spiceio' | tr -d '\r' || true)
8686
if [[ -n "$RUNNING_HEADER" ]]; then
8787
# Extract version from "Server: spiceio/X.Y.Z"; bare "Server: spiceio"
8888
# (no slash) means a pre-versioned build — treat as outdated.
@@ -160,7 +160,7 @@ runs:
160160
exit 1
161161
fi
162162
ENDPOINT=$(grep 'listening on' "$SPICEIO_LOG" 2>/dev/null | grep -o 'http://[^ ]*' | tail -1 || true)
163-
if [[ -n "$ENDPOINT" ]] && curl -sf -I "$ENDPOINT/" 2>/dev/null | grep -qi "server: spiceio"; then
163+
if [[ -n "$ENDPOINT" ]] && curl -s -I "$ENDPOINT/" 2>/dev/null | grep -qi "server: spiceio"; then
164164
echo "spiceio ready at $ENDPOINT (PID $PID)"
165165
echo "endpoint=$ENDPOINT" >> "$GITHUB_OUTPUT"
166166
exit 0

0 commit comments

Comments
 (0)