I\'m building docker images with Github Actions and want to tags images with branch name,
I found only GITHUB_REF variable, but it results in refs/heads/f
Be aware that if you are executing your GitHub action on pull request trigger, then GITHUB_REF variable will contain something like refs/pull/421/merge so if you will try to git push to that name it will most likely fail.
What you can use though are references on the GitHub context in your YAML. Something like: ${{ github.head_ref }}
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context