Workflow filter isn't working as expected

I have this filter defined as such

references:
  beta_filter: &beta_filter
    context: org-global
    requires:
      - tests_android
      - tests_ios
    filters:
      tags:
        only: /^v.*/
      branches:
        only: [master]

Which is later used in a workflow as such
- build_android_release: *build_release_filter
- build_ios_release: *build_release_filter

This seems to run for all builds and not for only tagged commits, is it a known issue or am I doing something wrong?

There is a logical OR between the two things, not an AND. You should find that pushing on non-master branches will not build unless they are tagged in the way you are expecting.

I know this has come up in the forum before. This thread is a bit miserable, but at least it points to a feature suggestion.

You could do some filtering at the shell level - that is not ideal as the job will always run, but it would work. Use a Bash conditional to not do your main build work unless the two conditions are satisfied.

I have changed the filters:

references:
  beta_filter: &beta_filter
    context: org-global
    requires:
      - tests_android
      - tests_ios
    filters:
      tags:
        only: /^v.*/

  build_release_filter: &build_release_filter
    requires:
      - tests_android
      - tests_ios
    filters:
      tags:
        ignore: /^v.*/

In my head the two filters should be mutually exclusive, but they are still both running on every commit

Mind if I BUMP?

One very hacky solution I’m looking at is having one of the filters on the job that I want to AND, and having another filter on one of its required jobs. Won’t work for every workflow and is pretty awful, but might be a workaround.