Goal: To run a job for on tag creation from a spefiic branch i.e. validate both tag name and the branch the tag was created from.
Actual Output: It looks when a have a condition to check for tags i.e. either using
on: release or
on: tags, it uses
master as the branch though the UI shows the branch the tag was created from.
I have a condition (shown below) for a task. The expected behavior is look if the tag matching that pattern was created from a specific branch i.e.
Ideally, I would like to check if a specific pattern tag was created from a specific branch, but that’s not how the condition below works.
if: startsWith(github.ref, 'refs/tags/staging-release-') && github.ref == 'refs/heads/staging'
It looks like github.ref gives either the branch or tag ref, but not both. Could someone let me know if there’s a way to check for both the tag and the branch the tag was created from? Thanks!
@andreagriffiths11 Could you check if this is a bug? Please advise!