Skip to content

[Bug] fix invalid YAML in release workflow heredoc causing startup failures#191

Merged
samatstariongroup merged 1 commit into
developmentfrom
bug/release-workflow-invalid-yaml-heredoc
Jun 29, 2026
Merged

[Bug] fix invalid YAML in release workflow heredoc causing startup failures#191
samatstariongroup merged 1 commit into
developmentfrom
bug/release-workflow-invalid-yaml-heredoc

Conversation

@samatstariongroup

Copy link
Copy Markdown
Member

Problem

The Nuget-Release workflow was running on every push (as failed runs), no longer showed the manual "Run workflow" button, and appeared in the Actions UI as .github/workflows/nuget-release.yml instead of Nuget-Release.

Root cause: the workflow file is invalid YAML. In the Generate THIRD-PARTY-NOTICES.txt step the heredoc body and its EOF terminator sit at column 0, but they live inside a run: | block scalar indented 10 spaces. A line less-indented than the block terminates the YAML scalar, so the parser then tries to read ------, .NET Runtime, https://… as workflow structure and fails.

A single invalid file produces all three symptoms:

Symptom Cause
Runs on every commit Invalid file → GitHub creates a startup-failure run on each push
No "Run workflow" button Parser never reads on: workflow_dispatch
Name shown as file path Parser never reads name:

Introduced in #182 (commit b3c3b4f1) when the THIRD-PARTY-NOTICES block was added — exactly when manual dispatch stopped working.

Fix

Replace the cat <<'EOF' heredoc with an indented printf that produces byte-identical output. A heredoc can't be used here cleanly: its EOF terminator must be at column 0 (which breaks the YAML), and <<- only strips tabs (banned by the project style). With printf, every line stays inside the block scalar, so the file is valid YAML and bash output is unchanged.

Verification (after merge to development)

gh api repos/STARIONGROUP/uml4net/actions/workflows --jq '.workflows[] | {name, path, state}'

The release entry should now show name: Nuget-Release (not the path). Then push a commit and confirm no new startup-failure run is created, and that the "Run workflow" dropdown appears in the Actions tab.

@samatstariongroup
samatstariongroup merged commit 1c675b2 into development Jun 29, 2026
7 of 8 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@samatstariongroup
samatstariongroup deleted the bug/release-workflow-invalid-yaml-heredoc branch June 29, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant