title: GitHub Actions CI Conditional Regex
body: <p>I'm trying to move my CI workflow from CircleCI to GitHub Actions. The last major struggle I'm facing is with deployment.</p>
  
  <p>Currently my workflow is such that when I push a tag to my GitHub repo, it will run the tests, then run the deployment. Only thing is CircleCI filters tags to only run the job if the tag matches the regex: <code>/v[0-9]+(\.[0-9]+)*/</code>.</p>
  
  <p>How can I check to ensure the tag I pushed matches the regex pattern above before running the deployment?</p>
  
  <p>I currently have the following GitHub Actions yml file:</p>
  
  <pre><code>name: CI
  on: [create]
  
  jobs:
    # ...
  
    deploy:
      runs-on: ubuntu-latest
      if: github.event.ref_type == 'tag' &amp;&amp; github.event.ref == SOMETHING HERE
      steps:
        - uses: actions/checkout@v1
        # ...
  </code></pre>
  
  <p>Under the <code>if</code> block, I need to change <code>github.event.ref == SOMETHING HERE</code> to be something else. I have looked in the <a href="https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions" rel="noreferrer">Contexts and expression syntax for GitHub Actions</a> documentation page. But due to how flexible and powerful GitHub Actions is, it seems like there should be a method or way to do this, or at least some type of workaround.</p>
  
  <p>How can I ensure the tag (<code>github.event.ref</code>) matches the regex pattern (<code>/v[0-9]+(\.[0-9]+)*/</code>)?</p>