Been using GitHub Actions v2 (CI/CD) to implement publishing of npm packages when a new tag is pushed to our GitHub repo. I have looked into https://help.github.com/en/articles/workflow-syntax-for-github-actions#example-restricting-the-workflow-run-to-specific-refs-and-paths but can’t get it to work. Here’s a snippet of my workflow file:
on: push: tags: - my-tag ...
Problem is when I push a new commit even with no tags it still gets triggered. I also tried using the
create event but still no dice, when a new branch is created it still triggers the workflow.
Am I doing something wrong with filters? Would you have an alternative perhaps on how to trigger a workflow only when a new tag is created?
Also, if I want to filter tags that have a @ sign, is that the way to do it?
on: push: tags: - \@orgname/*
Which should mean "Only run on tags that start with