File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,27 @@ runs:
103103 fi
104104
105105 echo "executing: $STACKQL_DEPLOY_CMD $ENV_OPTS"
106+
107+ # Run command and capture exit code
108+ set +e
106109 $STACKQL_DEPLOY_CMD $ENV_OPTS
110+ EXIT_CODE=$?
111+ set -e
112+
113+ # Handle failure
114+ if [ $EXIT_CODE -ne 0 ]; then
115+ echo "## ❌ StackQL Deploy ${{ inputs.command }} Failed" >> $GITHUB_STEP_SUMMARY
116+ echo "" >> $GITHUB_STEP_SUMMARY
117+ echo "**Environment:** ${{ inputs.stack_env }}" >> $GITHUB_STEP_SUMMARY
118+ echo "**Stack Directory:** ${{ inputs.stack_dir }}" >> $GITHUB_STEP_SUMMARY
119+ echo "" >> $GITHUB_STEP_SUMMARY
120+ echo "Please check the logs above for details." >> $GITHUB_STEP_SUMMARY
121+ echo "" >> $GITHUB_STEP_SUMMARY
122+ echo "_Failed at $(date -u +'%Y-%m-%d %H:%M:%S UTC')_" >> $GITHUB_STEP_SUMMARY
123+ exit $EXIT_CODE
124+ fi
107125
108- # Capture outputs if output file was specified
126+ # Capture outputs if output file was specified (success path)
109127 if [ -n "$OUTPUT_FILE" ] && [ -f "$OUTPUT_FILE" ]; then
110128 # Read the JSON content
111129 DEPLOYMENT_OUTPUTS=$(cat "$OUTPUT_FILE")
You can’t perform that action at this time.
0 commit comments