Fix duplicate run: key that broke pr.yaml parsing#81
Merged
Conversation
The test-linux-core job had an orphan 'run:' block on line 244 — the 'Install OpenSSL 1.1 for .NET 5.0' step lost its '- name:' line during a prior cleanup, so YAML saw two 'run:' keys under the same step. GitHub's YAML parser silently fails on duplicate mapping keys, which is why pull_request_target never fired since PR #72 merged. All open PRs (including Dependabot updates #77, #78, #79) have been blocked because no required check ever ran. Restoring the missing step header fixes the parse error and brings the workflow back online. Verified with js-yaml: file now parses cleanly and all 6 jobs are present. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a YAML structure error in the gated PR workflow so GitHub Actions can successfully parse and run the intended pull_request_target checks.
Changes:
- Restores the missing
- name:header for the “Install OpenSSL 1.1 for .NET 5.0” step to eliminate the duplicate/orphanrun:mapping. - Adds clarifying comments explaining why
libssl1.1is installed fromfocal-security.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
The test-linux-core job in `pr.yaml` has an orphan `run:` block at line 244 — the "Install OpenSSL 1.1 for .NET 5.0" step lost its `- name:` header during a prior cleanup. YAML parsers see two `run:` keys under one step, which is invalid.
GitHub Actions silently fails to parse the workflow on duplicate mapping keys. That's why no `pull_request_target` event has ever fired since PR #72 merged — the workflow file was never actually loaded by GitHub Actions. Only the implicit `push` events registered (and failed, since there's no `push:` trigger defined).
Verification
Before fix (parsing the file from main):
```
PARSE ERROR: duplicated mapping key (244:9)
```
After fix:
```
PARSED OK
name: PR Checks v3 (Gated)
on keys: [ 'pull_request_target' ]
jobs: secrets-scan,detect-projects,test-linux-core,test-windows,test-macos-core,security-scan
```
Evidence
Impact
Once merged, Dependabot PRs (#77, #78, #79) and future PRs should have their required checks run normally. This keeps the `pull_request_target` trust model (workflow YAML sourced from main) that was intended.
Merging
This PR is itself subject to the broken required checks. To merge, admin override or temporarily disable the ruleset.
🤖 Generated with Claude Code