Skip to content

Commit 6ed5142

Browse files
committed
fix(docker/get-image-metadata): handle commit sha properly
1 parent af96184 commit 6ed5142

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

actions/docker/get-image-metadata/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ runs:
115115
const shortCommitSha = stdout.trim();
116116
core.debug("shortCommitSha: " + shortCommitSha);
117117
118-
const commitShaMatcher = /(pr-${{ steps.get-issue-number.outputs.issue-number }}-)([0-9a-f]{7,40})(-)/;
118+
const commitShaMatcher = /(pr-${{ steps.get-issue-number.outputs.issue-number }}-)([0-9a-f]{7,40})/;
119119
const fixedTags = tags.split("\n").map(tag => {
120-
return tag.replace(commitShaMatcher, "$1"+shortCommitSha+"$3");
120+
return tag.replace(commitShaMatcher, "$1"+shortCommitSha);
121121
}).join("\n");
122122
123123
core.setOutput('tags', fixedTags);

0 commit comments

Comments
 (0)