Skip to content

Commit d789457

Browse files
committed
fix: correct heredoc syntax in GitHub Actions workflow
- Fix heredoc EOF markers that had leading spaces (breaks shell parsing) - Add sed post-processing to strip leading whitespace from generated files - Use unique EOF markers (OVERRIDE_EOF, ENV_EOF, SUMMARY_EOF) for clarity - Change summary heredoc from quoted to unquoted to enable date expansion
1 parent a70256a commit d789457

1 file changed

Lines changed: 28 additions & 9 deletions

File tree

.github/workflows/notebook-execution.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
# Default healthcheck uses /v1/health which returns 404
6161
# Correct endpoint is /v1/health/ready
6262
mkdir -p ambient-provider/ambient-scribe/infra
63-
cat > ambient-provider/ambient-scribe/infra/compose.override.yml << 'EOF'
63+
cat > ambient-provider/ambient-scribe/infra/compose.override.yml <<'OVERRIDE_EOF'
6464
# Auto-generated override to fix NIM health check endpoints
6565
services:
6666
parakeet-nim:
@@ -77,7 +77,9 @@ jobs:
7777
timeout: 30s
7878
retries: 10
7979
start_period: 1800s
80-
EOF
80+
OVERRIDE_EOF
81+
# Remove leading spaces from the generated file
82+
sed -i 's/^ //' ambient-provider/ambient-scribe/infra/compose.override.yml
8183
echo "Created compose.override.yml with fixed health check endpoints"
8284
8385
- name: Pre-configure API environment file
@@ -88,12 +90,14 @@ jobs:
8890
# Create .env file with actual API keys before notebook runs make bootstrap
8991
# This prevents "NVIDIA_API_KEY is still a placeholder" error
9092
mkdir -p ambient-provider/ambient-scribe/apps/api
91-
cat > ambient-provider/ambient-scribe/apps/api/.env << EOF
93+
cat > ambient-provider/ambient-scribe/apps/api/.env <<ENV_EOF
9294
# Auto-configured by GitHub Actions workflow
9395
NVIDIA_API_KEY=${NVIDIA_API_KEY}
9496
NGC_API_KEY=${NGC_API_KEY}
9597
RIVA_URI=parakeet-nim:50051
96-
EOF
98+
ENV_EOF
99+
# Remove leading spaces from the generated file
100+
sed -i 's/^ //' ambient-provider/ambient-scribe/apps/api/.env
97101
echo "Pre-configured apps/api/.env with API keys"
98102
99103
- name: Execute notebook and convert to HTML
@@ -309,14 +313,16 @@ jobs:
309313
run: |
310314
SUMMARY_FILE=".github/workflows/execution-summary.md"
311315
312-
cat > "$SUMMARY_FILE" << 'EOF'
316+
cat > "$SUMMARY_FILE" <<SUMMARY_EOF
313317
# Notebook Execution Summary
314-
318+
315319
Generated at: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
316-
320+
317321
## Execution Results
318-
319-
EOF
322+
323+
SUMMARY_EOF
324+
# Remove leading spaces from the generated file
325+
sed -i 's/^ //' "$SUMMARY_FILE"
320326
321327
# Check each notebook result
322328
for notebook in ambient-patient ambient-provider; do
@@ -375,3 +381,16 @@ jobs:
375381
echo "- ambient-provider.html: artifacts/ambient-provider-html/ambient-provider.html" >> $GITHUB_STEP_SUMMARY
376382
echo "" >> $GITHUB_STEP_SUMMARY
377383
echo "These artifacts can be downloaded and used in subsequent workflow steps." >> $GITHUB_STEP_SUMMARY
384+
385+
scan:
386+
# needs: preflight
387+
if: always()
388+
uses: NVIDIA-AI-Blueprints/nim-docker-scanner/.github/workflows/scan.yml@main
389+
with:
390+
# exclude-dirs: 'external'
391+
resolve-latest: true
392+
scan-docker-images: true
393+
scan-hosted-nim: true
394+
secrets:
395+
NVIDIA_API_KEY: ${{ secrets.NVIDIA_API_KEY }}
396+
NVCF_CONFIG_ON_GITHUB_TOKEN: ${{ secrets.NVCF_CONFIG_ON_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)