I am currently looking into github actions for the first time.
I have a process where I build a docker image and publish it to Docker Hub.
This all seems to be working perfectly, however when I push to master it builds and tags with master branch however, I would like this to tag with the latest branch?
I know you can do conditionals in the .yml file inside of the steps such as:
step:
if: github.ref == 'refs/heads/master'
but I was wondering if I could do it inline so I could essentially say
build . docker-image-name:${{ github.ref == 'refs/head/master' ? 'latest' : github.ref }}
I know this isn't the syntax but that's the idea,