title: Use environment variable in github action if
body: <p>I'm trying to use an environment variable in an <code>if</code> condition in github actions like so:</p>
  
  <pre><code>name: Worfklow
  on:
    push
  
  jobs:
    build:
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v1
  
        - name: EXIT step
          if: $GITHUB_REF == 'specific-branch'
          run: exit 1
  
  </code></pre>
  
  <p>I want to exit if the current branch is equal to a specific branch.</p>
  
  <p>Unfortunately, the github actions console displays an error:</p>
  
  <pre><code>Unexpected symbol: '$GITHUB_REF'
  </code></pre>
  
  <p>I can use <code>$GITHUB_REF</code> in a <code>run:</code> (where it contains the current branch), but not in an <code>if:</code>. What am I doing wrong?</p>