Fix workflow_dispatch bypass: force evaluation of skipped dependency conditions#324
Merged
greenc-FNAL merged 2 commits intomainfrom Feb 13, 2026
Merged
Conversation
Add always() to job conditions that check for skipped detect-changes. This forces GitHub Actions to evaluate the condition even when the detect-changes job is skipped (e.g., during workflow_dispatch). Without always(), GitHub Actions skips jobs before evaluating their if conditions when a needed job is skipped. Fixes workflow_dispatch invocation for: - coverage workflow - python-check workflow - cmake-build workflow - clang-format-check workflow - clang-tidy-check workflow - cmake-format-check workflow - actionlint-check workflow - jsonnet-format-check workflow - markdown-check workflow Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Verify workflow_dispatch invocation of coverage workflow
Fix workflow_dispatch bypass: force evaluation of skipped dependency conditions
Feb 13, 2026
Contributor
|
@phlexbot format |
Contributor
|
No automatic markdownlint fixes were necessary. |
Contributor
|
No automatic jsonnetfmt fixes were necessary. |
Contributor
|
No automatic cmake-format fixes were necessary. |
Contributor
|
No automatic clang-format fixes were necessary. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical workflow execution bug where manual triggers (workflow_dispatch) were incorrectly skipping main check jobs. GitHub Actions was skipping dependent jobs before evaluating their if conditions when a dependency was skipped. The fix adds always() to force condition evaluation in all affected workflows.
Changes:
- Added
always() &&wrapper to 9 workflow files to force evaluation of job conditions when thedetect-changesdependency is skipped - Restructured conditional logic with proper parenthesization to maintain the original intent while ensuring evaluation occurs
- Ensures workflows run correctly on manual triggers, scheduled runs, and workflow calls
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/python-check.yaml |
Added always() to force evaluation when detect-changes is skipped |
.github/workflows/markdown-check.yaml |
Added always() to force evaluation when detect-changes is skipped |
.github/workflows/jsonnet-format-check.yaml |
Added always() to force evaluation when detect-changes is skipped |
.github/workflows/coverage.yaml |
Added always() to force evaluation when detect-changes is skipped |
.github/workflows/cmake-format-check.yaml |
Added always() to force evaluation when detect-changes is skipped |
.github/workflows/cmake-build.yaml |
Added always() to force evaluation when detect-changes is skipped (also handles generate-matrix dependency) |
.github/workflows/clang-tidy-check.yaml |
Added always() to force evaluation when detect-changes is skipped |
.github/workflows/clang-format-check.yaml |
Added always() to force evaluation when detect-changes is skipped |
.github/workflows/actionlint-check.yaml |
Added always() to force evaluation when detect-changes is skipped |
knoepfel
approved these changes
Feb 13, 2026
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.
Manual workflow triggers via
workflow_dispatchwere incorrectly skipping main jobs. GitHub Actions skips dependent jobs whenneedsdependencies are skipped—before evaluating the job'sifcondition. Jobs checkingneeds.detect-changes.result == 'skipped'were never evaluated.Changes
Added
always()to force condition evaluation when dependencies are skipped:Affected Workflows
All workflows with detection bypass logic had the same pattern and required the same fix.
💡 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.