-
Hi, I have two actions, deploy-staging and deploy-production that I want to trigger from releases e.g. “v1.0.0-beta” (for staging) and “v1.0.0” (for production). I am trying to use the tags.created with a wild card match but both actions always trigger. See below: deploy-staging:
deploy-production:
Any idea how best to go about this? This should be simple to do, the docs say to use a “matching negative pattern” which I am but either I’m doing something wrong or it’s broken. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Tag filters are not evaluated for release event, they are only available to push event and pull_request event. To view more details, you can see here. As the workaround, you can try using the if conditional to skip the jobs in the workflow.
Related docs: Of course, if your projects really need the feature that tag filters are also available to release event, I recommend that you can directly report a feature request here. That will allow you to directly interact with the appropriate engineering team, and make it more convenient for the engineering team to collect and categorize your suggestions. |
Beta Was this translation helpful? Give feedback.
-
Thanks! This works for now :slight_smile: |
Beta Was this translation helpful? Give feedback.
@alexfoxy,
Tag filters are not evaluated for release event, they are only available to push event and pull_request event. To view more details, you can see here.
As the workaround, you can try using the if conditional to skip the jobs in the workflow.
The github.ref of the workflow run triggered by the release event is the released tag, you can use the job-level if conditional (jobs.<job_id>.if) to skip the jobs in the workflow according to the version of the tag.
For example: