Why isn't this workflow with both `on.push.paths` and `on.push.tags` running?

We have a workflow that we want to run whenever either of the following are true:

  1. A push, to any branch, modifies certain paths.
  2. A tag is pushed that looks like docs@foo.

Here is what we have so far:

Unexpectedly, this does not seem to run at all when a commit modifies the designated paths but isn’t tagged with docs@foo. Here’s an example PR that I expect to trigger the workflow, but doesn’t.

What am I missing? I expect on.push.paths and on.push.tags to be evaluated with a logical OR. Is it logical AND instead, or something?

Push != PR

This will only run for pushes that modify something in the designated paths and are tagged as expected.

1 Like

See the documentation:

If you define only tags or only branches , the workflow won’t run for events affecting the undefined Git ref.

So if you want the workflow to run for any branch in addition to the matching tags, add something like

    branches:    
      - '**'

to the the push conditions. Note that either way the workflow will only run if the path filter matches.

1 Like