Fix release workflow false failure on successful dispatch
The line [ "\$HTTP_CODE" != "204" ] && cat ... returns exit code 1 when the condition is false (all dispatches succeeded). Since it was the last command in the loop, the step reported failure. Changed to if/then/fi which doesn't leak the test exit code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -109,5 +109,5 @@ jobs:
|
|||||||
-d "{\"ref\": \"main\", \"inputs\": {\"tag\": \"${RELEASE_TAG}\"}}" \
|
-d "{\"ref\": \"main\", \"inputs\": {\"tag\": \"${RELEASE_TAG}\"}}" \
|
||||||
"${REPO_API}/actions/workflows/${workflow}/dispatches")
|
"${REPO_API}/actions/workflows/${workflow}/dispatches")
|
||||||
echo " -> HTTP ${HTTP_CODE}"
|
echo " -> HTTP ${HTTP_CODE}"
|
||||||
[ "$HTTP_CODE" != "204" ] && cat /tmp/dispatch_resp.txt && echo ""
|
if [ "$HTTP_CODE" != "204" ]; then cat /tmp/dispatch_resp.txt; echo ""; fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user