diff --git a/dist/index.js b/dist/index.js index 2b7dd09..0f4ada2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2114,7 +2114,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 00a1d27..8573cf0 100644 --- a/src/ref-helper.ts +++ b/src/ref-helper.ts @@ -171,7 +171,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