Skip to content

Handle disabled workflows gracefully#7

Merged
dpristovnik-veza merged 1 commit into
masterfrom
fix/disabled-workflow-handling
Mar 31, 2026
Merged

Handle disabled workflows gracefully#7
dpristovnik-veza merged 1 commit into
masterfrom
fix/disabled-workflow-handling

Conversation

@dpristovnik-veza

Copy link
Copy Markdown

Problem

When dispatching a workflow that has been disabled in the GitHub UI, the API returns an error ending with "a disabled workflow". Currently the action treats this as a hard failure via core.setFailed(), which fails the entire step.

This is unnecessarily disruptive — a disabled workflow is an expected state, not an error. The caller may want the pipeline to continue even if one target workflow is turned off.

Solution

Catch errors ending with "a disabled workflow" and emit a warning (core.warning()) instead of failing the step. The action returns successfully, allowing downstream steps to continue.

Backported from benc-uk/workflow-dispatch v1.3.x.

Test plan

  • Full CI suite (no behavior change for enabled workflows)
  • Disabled workflow path is not testable in CI without manually disabling a workflow

@dpristovnik-veza dpristovnik-veza merged commit 6d55d27 into master Mar 31, 2026
20 of 21 checks passed
@dpristovnik-veza dpristovnik-veza deleted the fix/disabled-workflow-handling branch March 31, 2026 19:28
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