8000 Merge pull request #203 from crazy-max/san-fix · docker/metadata-action@69f6fc9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 69f6fc9

Browse files
authored
Merge pull request #203 from crazy-max/san-fix
Sanitize tag earlier
2 parents f206c36 + 2f5b5ae commit 69f6fc9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/meta.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ export class Meta {
312312
if (val.length == 0) {
313313
return version;
314314
}
315+
val = Meta.sanitizeTag(val);
315316
if (version.main == undefined) {
316317
version.main = val;
317318
} else if (val !== version.main) {
@@ -424,9 +425,9 @@ export class Meta {
424425
}
425426
const tags: Array<string> = [];
426427
for (const imageName of this.getImageNames()) {
427-
tags.push(`${imageName}:${Meta.sanitizeTag(this.version.main)}`);
428+
tags.push(`${imageName}:${this.version.main}`);
428429
for (const partial of this.version.partial) {
429-
tags.push(`${imageName}:${Meta.sanitizeTag(partial)}`);
430+
tags.push(`${imageName}:${partial}`);
430431
}
431432
if (this.version.latest) {
432433
const latestTag = `${this.flavor.prefixLatest ? this.flavor.prefix : ''}latest${this.flavor.suffixLatest ? this.flavor.suffix : ''}`;

0 commit comments

Comments
 (0)
0