diff --git a/dist/index.js b/dist/index.js index ddf2b3d89..855a40ad5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2059,7 +2059,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 1c2504986..912ad4e03 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