question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Event is triggering for every tag without matching the pattern

See original GitHub issue

I have setup a mobile deployment for on create tag with specific regex pattern. But the deployment is starting for every tag regardless the pattern. Following is my yml code snippet.

on:
   create:
     tags:
       - '^v(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)(\()(\d+)(\))$'

Then I have tried with the simplest pattern which was mentioned in the documentation.

on:
   create:
     tags:
       -v*

But still the same results. It was triggering for every tag was created.

To Reproduce Add one of above trigger to your yml file and create a new tag named “test”

Expected behavior Deployment event should not have been started.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
tharindu-difcommented, Feb 21, 2022

I’m sorry, but I didn’t understand you now, which part doesn’t work for you? With the suggested change, when I try to push tag test to the repo, the workflow does not start, while when I push tag named v1.1.1(1) (which matches the first regex) the workflow starts. That’s the behavior you want, isn’t it?

Able to get it sorted as well. Following filters works for me

tags:
   - 'v[0-9]+.[0-9]+.[0-9]+'
tags:
   - 'v[0-9]+.[0-9]+.[0-9]+([0-9]+)'
1reaction
ruvceskistefancommented, Feb 21, 2022

Great, thanks @tharindu-dif for the quick feedback! I will close this issue since we have solved the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon EventBridge event patterns
Event patterns have the same structure as the events they match. Rules use event patterns to select events and send them to targets....
Read more >
Trigger Github Action only on new tags?
Use the following syntax: on: push: # Pattern matched against refs/tags tags: - '*' # Push events to every tag not containing /....
Read more >
Element visibility trigger - Tag Manager Help
If multiple elements on a given page are matched by a CSS Selector, this trigger will fire the first time each one of...
Read more >
Tag based build trigger doesn't work - Other Issues
The first thing to check when you have build trigger issues is the webhook. E.g. GitLab has a separate “webhook event” for Tags...
Read more >
How to Use ReGex for Google Tag Manager
In triggers, you can utilize RegEx in the Custom Event Trigger and in filter settings, such as Matches RegEx, Matches RegEx (ignore case),...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found