Skip to content

Commit

Permalink
Lowercase only on image name (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Nov 20, 2020
1 parent 6a86fe1 commit 2860e42
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function run() {
core.info(tag);
}
core.endGroup();
core.setOutput('tags', tags.join(inputs.sepTags).toLowerCase());
core.setOutput('tags', tags.join(inputs.sepTags));

const labels: Array<string> = meta.labels();
core.startGroup(`Docker labels`);
Expand Down
9 changes: 5 additions & 4 deletions src/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,16 @@ export class Meta {

let tags: Array<string> = [];
for (const image of this.inputs.images) {
tags.push(`${image}:${version.main}`);
const imageLc = image.toLowerCase();
tags.push(`${imageLc}:${version.main}`);
for (const partial of version.partial) {
tags.push(`${image}:${partial}`);
tags.push(`${imageLc}:${partial}`);
}
if (version.latest) {
tags.push(`${image}:latest`);
tags.push(`${imageLc}:latest`);
}
if (this.context.sha && this.inputs.tagSha) {
tags.push(`${image}:sha-${this.context.sha.substr(0, 7)}`);
tags.push(`${imageLc}:sha-${this.context.sha.substr(0, 7)}`);
}
}
return tags;
Expand Down

0 comments on commit 2860e42

Please sign in to comment.