I have a workflow that I use for generating a github release. The workflow has several jobs (most of which are reused by my build-and-test workflow).
I have a pretty large regex tag filter defined on the last job of the workflow. However, unless I propagate that regex to all the jobs in the workflow, those other jobs also run on pull requests, which is wasteful because that’s what my other workflow is for.
My question is: can I define a filter at the workflow level instead of job level? If not, is there a way to define that regex pattern once and reuse it across those jobs?
release:
jobs:
- job-one
- job-two:
requires:
- job-one
- publish-release:
requires:
- job-two
filters:
branches:
ignore: /.*/
tags:
only: {really long regex pattern}