title: How to get a git ref from within GitHub Actions?
body: <p>This is what I am trying:</p>
  <pre><code>- name: Create tag
    uses: actions/github-script@v3
    with:
      script: |
        console.log(await github.git.getRef({
          owner: context.repo.owner,
          ref: &quot;refs/tags/v0.0.1&quot;,
          repo: context.repo.repo,
        }));
  </code></pre>
  <p>However, it is producing &quot;Not Found&quot; error.</p>
  <p>If I check using git, I can see that tag exists:</p>
  <pre><code>$ git ls-remote
  From git@github.com:contra/contra-deploy-tools.git
  fc857fff2008eca7c4a547ad4bb35cd7ef5f3891    HEAD
  fc857fff2008eca7c4a547ad4bb35cd7ef5f3891    refs/heads/main
  b4e20f75a51aac030e3d8ca1360ee1ff84f10c18    refs/tags/v0.0.1
  </code></pre>
  <p>It appears like this is a permission issue. However, I am able to create a tag, and workflow permissions are configured to &quot;Read and write permissions&quot;.</p>
  <p>What's more surprising is that I am able to list references within the workflow:</p>
  <pre><code>Run git ls-remote
  From https://github.com/contra/contra-deploy-tools
  f0191b469168aa48ee177d270fa2af507d3f7710    HEAD
  f0191b469168aa48ee177d270fa2af507d3f7710    refs/heads/main
  b4e20f75a51aac030e3d8ca1360ee1ff84f10c18    refs/tags/v0.0.1
  </code></pre>
  <p>This seems to be API specific issue.</p>
  <p>What am I missing?</p>