My workflow run is defined as follows:
on: pull_request: push: branches: ['**'] tags: ['**'] # Runs daily schedule: - cron: '0 0 * * *'
How do I know inside my steps that I am currently on a git tag or git branch? And how do I get the name of either of it?
If the workflow is triggered by a git tag, I want to tag my Docker images by the git tag name.
If the workflow is triggered by a git branch, I want to tag my Docker images by the git branch name plus a suffix.