Skip to content

Commit bcfaff0

Browse files
owineclaude
andcommitted
fix(deploy): add fromJson fallback for early workflow failures
When the workflow fails before discover-stacks runs (e.g., Tailnet connection failure), the Report Deployment Status step still executes due to `if: always()`. The fromJson() call on an undefined output causes a template parsing error. Added null-coalescing fallback `|| '[]'` to default to an empty array. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0925d04 commit bcfaff0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,8 @@ jobs:
799799
echo "::group::Deployment Summary"
800800
801801
# Parse stacks from discovered output and create display list
802-
STACK_LIST="${{ join(fromJson(steps.discover-stacks.outputs.stacks), ', ') }}"
802+
# Use empty array fallback when discover-stacks step didn't run (early failure)
803+
STACK_LIST="${{ join(fromJson(steps.discover-stacks.outputs.stacks || '[]'), ', ') }}"
803804
if [ "${{ inputs.has-dockge }}" = "true" ]; then
804805
STACK_LIST="dockge, $STACK_LIST"
805806
fi

0 commit comments

Comments
 (0)