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