diff --git a/dist/index.js b/dist/index.js index c39596b..1665cb0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2110,7 +2110,8 @@ function testRef(git, ref, commit) { // refs/tags/ else if (upperRef.startsWith('REFS/TAGS/')) { const tagName = ref.substring('refs/tags/'.length); - return ((yield git.tagExists(tagName)) && commit === (yield git.revParse(ref))); + return ((yield git.tagExists(tagName)) && + commit === (yield git.revParse(`${ref}^{commit}`))); } // Unexpected else { diff --git a/src/ref-helper.ts b/src/ref-helper.ts index 047e906..ee0724a 100644 --- a/src/ref-helper.ts +++ b/src/ref-helper.ts @@ -167,7 +167,8 @@ export async function testRef( else if (upperRef.startsWith('REFS/TAGS/')) { const tagName = ref.substring('refs/tags/'.length) return ( - (await git.tagExists(tagName)) && commit === (await git.revParse(ref)) + (await git.tagExists(tagName)) && + commit === (await git.revParse(`${ref}^{commit}`)) ) } // Unexpected