Skip to content

Commit 815a74d

Browse files
EdwardAngertclaude
andcommitted
fix: resolve bash variable indirection issue in workflow
- Replace dynamic variable indirection with explicit case statement - Fix 'invalid variable name' error during step output access - Improve compatibility with different shell environments 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent aacac5c commit 815a74d

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed

.github/docs/actions/docs-core/action.yaml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,12 +1107,46 @@ runs:
11071107
fi
11081108
11091109
# Extract status and message from step outputs
1110-
STATUS_VAR="steps.${STEP_ID}.outputs.status"
1111-
MESSAGE_VAR="steps.${STEP_ID}.outputs.message"
1110+
# We'll use a more compatible approach than variable indirection
1111+
# Instead of dynamic variables, we'll use a case statement to look up the values
11121112
1113-
# Use status from step output or default to 'skipped'
1114-
STATUS="${!STATUS_VAR:-skipped}"
1115-
MESSAGE="${!MESSAGE_VAR:-Not run}"
1113+
# Default values
1114+
STATUS="skipped"
1115+
MESSAGE="Not run"
1116+
1117+
# Set status based on step ID
1118+
case "$STEP_ID" in
1119+
"lint-markdown")
1120+
if [ -n "${{ steps.lint-markdown.outputs.status }}" ]; then
1121+
STATUS="${{ steps.lint-markdown.outputs.status }}"
1122+
MESSAGE="${{ steps.lint-markdown.outputs.message }}"
1123+
fi
1124+
;;
1125+
"check-format")
1126+
if [ -n "${{ steps.check-format.outputs.status }}" ]; then
1127+
STATUS="${{ steps.check-format.outputs.status }}"
1128+
MESSAGE="${{ steps.check-format.outputs.message }}"
1129+
fi
1130+
;;
1131+
"check-links")
1132+
if [ -n "${{ steps.check-links.outputs.status }}" ]; then
1133+
STATUS="${{ steps.check-links.outputs.status }}"
1134+
MESSAGE="${{ steps.check-links.outputs.message }}"
1135+
fi
1136+
;;
1137+
"lint-vale")
1138+
if [ -n "${{ steps.lint-vale.outputs.status }}" ]; then
1139+
STATUS="${{ steps.lint-vale.outputs.status }}"
1140+
MESSAGE="${{ steps.lint-vale.outputs.message }}"
1141+
fi
1142+
;;
1143+
"check-cross-references")
1144+
if [ -n "${{ steps.check-cross-references.outputs.status }}" ]; then
1145+
STATUS="${{ steps.check-cross-references.outputs.status }}"
1146+
MESSAGE="${{ steps.check-cross-references.outputs.message }}"
1147+
fi
1148+
;;
1149+
esac
11161150
11171151
# Add comma if not the first item
11181152
if [ "$FIRST_ITEM" = true ]; then

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy