Skip to content

Commit 1e97155

Browse files
EdwardAngertClaude
and
Claude
committed
fix: resolve remaining actionlint issues in workflows
- Add missing artifact_ready output to docs-core action - Use safely sanitized branch name in docs-unified - Remove direct usage of github.head_ref for security 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent dbede7e commit 1e97155

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ outputs:
9292
preview_url:
9393
description: 'Documentation preview URL'
9494
value: ${{ steps.context-info.outputs.preview_url || '' }}
95+
sanitized_branch:
96+
description: 'Sanitized branch name for URLs (slashes replaced with dashes)'
97+
value: ${{ steps.context-info.outputs.sanitized_branch || '' }}
9598
direct_links:
9699
description: 'Comma-separated list of direct links to changed documents'
97100
value: ${{ steps.context-info.outputs.direct_links || '' }}
@@ -137,6 +140,9 @@ outputs:
137140
needs_vale:
138141
description: 'Whether Vale is needed for the requested validations'
139142
value: ${{ steps.tool-requirements.outputs.needs_vale || 'false' }}
143+
artifact_ready:
144+
description: 'Boolean indicating if artifacts are ready for upload'
145+
value: ${{ steps.prepare-artifacts.outputs.artifact_ready || 'false' }}
140146

141147
runs:
142148
using: 'composite'

.github/workflows/docs-unified.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,13 @@ jobs:
222222
if [ "${{ steps.docs-shared.outputs.preview_url }}" != "" ]; then
223223
echo " 🔗 Main preview: ${{ steps.docs-shared.outputs.preview_url }}"
224224
225-
# Extract branch name for additional links
226-
BRANCH="${{ github.head_ref || github.ref_name }}"
227-
BRANCH="${BRANCH//\//-}" # Replace slashes with dashes
225+
# Using outputs from steps is safer than directly referencing github context
226+
BRANCH="${{ steps.docs-shared.outputs.sanitized_branch }}"
227+
if [ -z "$BRANCH" ]; then
228+
# Fallback to a safe branch name extraction
229+
BRANCH="${{ github.ref_name }}"
230+
BRANCH="${BRANCH//\//-}" # Replace slashes with dashes
231+
fi
228232
229233
echo " 🔗 Installation guide: https://coder.com/docs/@$BRANCH/install/index"
230234
echo " 🔗 Getting started: https://coder.com/docs/@$BRANCH/start/first-workspace"

0 commit comments

Comments
 (0)