GitHub Actions paths and paths-ignore together on one event
Writing GitHub Actions paths and paths-ignore together on one event is documented as unsupported, but no published component rejects it, so the file compiles and the workflow runs. What decides which of the two filters wins is a service GitHub does not publish, which is why the honest answer is to stop writing both rather than to learn the precedence. The published schema reaches the event…
GitHub Actions does not officially support using both the `paths` and `paths-ignore` filters in the same event. However, workflows that contain this combination still compile and run, but the outcome depends on an undocumented service process. The best practice is to avoid using both filters and instead choose one based on the desired outcome.
To fix a workflow with conflicting filters, decide on a single intent, write a clear sentence describing that intent, and adjust the filter list accordingly. Place any exclusions after the positive patterns, quote patterns that include special characters, and test the filter with real pushes to ensure the desired behavior. There is no published enforcement for this rule, so the safest approach is to adhere to documented guidelines and test thoroughly.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.