mirror of
https://code.forgejo.org/docker/metadata-action.git
synced 2025-08-05 22:00:53 +00:00
Add image version output
This commit is contained in:
parent
90ec551e12
commit
03eb07f964
7 changed files with 81 additions and 52 deletions
10
src/main.ts
10
src/main.ts
|
@ -28,14 +28,20 @@ async function run() {
|
|||
|
||||
const meta: Meta = new Meta(inputs, context, repo);
|
||||
|
||||
const version: string | undefined = meta.version();
|
||||
core.startGroup(`Docker image version`);
|
||||
core.info(`${version}`);
|
||||
core.endGroup();
|
||||
core.setOutput('version', version);
|
||||
|
||||
const tags: Array<string> = meta.tags();
|
||||
core.startGroup(`Generated Docker tags`);
|
||||
core.startGroup(`Docker tags`);
|
||||
core.info(JSON.stringify(tags));
|
||||
core.endGroup();
|
||||
core.setOutput('tags', tags.join(inputs.sepTags));
|
||||
|
||||
const labels: Array<string> = meta.labels();
|
||||
core.startGroup(`Generated Docker labels`);
|
||||
core.startGroup(`Docker labels`);
|
||||
core.info(JSON.stringify(labels));
|
||||
core.endGroup();
|
||||
core.setOutput('labels', labels.join(inputs.sepTags));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue