-
Notifications
You must be signed in to change notification settings - Fork 21
Fix invalid matrix strategy placement in publish workflow #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: JDetmar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a critical YAML syntax error in the publish workflow where a strategy matrix was incorrectly placed inside a step definition. GitHub Actions requires strategy to be defined at the job level, not within individual steps. The fix reverts to explicit download steps for each of the 6 package artifacts, maintaining conditional logic for selective or bulk publishing.
Key Changes:
- Fixed invalid YAML syntax by replacing step-level matrix strategy with 6 explicit download steps
- Each download step includes proper conditionals based on
inputs.packageparameter - Added
actionlintto.gitignorefor workflow linting tool
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.gitignore |
Added actionlint (GitHub Actions workflow linter) to ignored files |
.github/workflows/publish.yml |
Replaced invalid step-level matrix strategy with 6 explicit artifact download steps, each with conditional logic for selective package publishing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: package-NLog.Extensions.AzureServiceBus | ||
| path: packages | ||
| github-token: ${{ github.token }} | ||
| run-id: ${{ steps.get-run-id.outputs.run_id }} |
Copilot
AI
Dec 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing blank line before this step. All other steps in the workflow are separated by blank lines for consistency and readability.
| run-id: ${{ steps.get-run-id.outputs.run_id }} | |
| run-id: ${{ steps.get-run-id.outputs.run_id }} |
#185) * Add CI steps for restoring projects and create publish workflow for NuGet * Update .github/workflows/publish.yml Co-authored-by: Copilot <[email protected]> * Update .github/workflows/publish.yml Co-authored-by: Copilot <[email protected]> * Update .github/workflows/publish.yml Co-authored-by: Copilot <[email protected]> * Update .github/workflows/ci.yml Co-authored-by: Copilot <[email protected]> * Update .github/workflows/ci.yml Co-authored-by: Copilot <[email protected]> * Add error handling for missing packages in publish workflow (#186) * Initial plan * Add error handling for package discovery in publish workflow Co-authored-by: JDetmar <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: JDetmar <[email protected]> * Fix invalid matrix strategy placement in publish workflow (#187) * Initial plan * Fix publish.yml syntax error - move strategy matrix to proper structure Co-authored-by: JDetmar <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: JDetmar <[email protected]> * Add restore step for matrix projects in CI workflow --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Copilot <[email protected]>
GitHub Actions workflow was failing due to invalid YAML syntax - a
strategymatrix was placed inside a step definition instead of at the job level.Changes:
actionlintto.gitignoreContext:
The
strategykeyword in GitHub Actions must be defined at the job level, not within steps. Conditional artifact downloads based oninputs.packagerequire either separate steps or job-level matrix with complex conditionals. Chose separate steps for clarity and maintainability.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.