title: How to get branch name on GitHub action?
body: <p>During a GitHub action, I'd like to know the name of the branch:</p>
  
  <ul>
  <li>for a push action: name of the current branch</li>
  <li>for a pull_request action: name of the target branch</li>
  </ul>
  
  <p>I need a string like <code>develop</code>, <code>master</code> or <code>feature/xxx</code> (and not refs/pull/…).</p>
  
  <p>The <code>${{ github.ref }}</code> var gives me <code>refs/heads/develop</code>. How can I get only the <code>develop</code>?</p>