How to get current branch within github actions

前端 未结 13 2068
-上瘾入骨i
-上瘾入骨i 2020-11-29 20:11

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

相关标签:
13条回答
  • 2020-11-29 21:08
    if: github.ref == 'refs/heads/integration' && github.event_name == 'push' 
    

    You can use the above command and replace whatever branch or event you want to run for.

    0 讨论(0)
提交回复
热议问题