1
0
mirror of https://github.com/docker/metadata-action.git synced 2025-02-27 21:40:14 +08:00
CrazyMax b5c378621c
switch to actions-toolkit implementation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-02-21 09:22:45 +01:00

27 lines
858 B
TypeScript

import * as core from '@actions/core';
import {Util} from '@docker/actions-toolkit/lib/util';
export interface Inputs {
images: string[];
tags: string[];
flavor: string[];
labels: string[];
sepTags: string;
sepLabels: string;
bakeTarget: string;
githubToken: string;
}
export function getInputs(): Inputs {
return {
images: Util.getInputList('images', {ignoreComma: true}),
tags: Util.getInputList('tags', {ignoreComma: true}),
flavor: Util.getInputList('flavor', {ignoreComma: true}),
labels: Util.getInputList('labels', {ignoreComma: true}),
sepTags: core.getInput('sep-tags', {trimWhitespace: false}) || `\n`,
sepLabels: core.getInput('sep-labels', {trimWhitespace: false}) || `\n`,
bakeTarget: core.getInput('bake-target') || `docker-metadata-action`,
githubToken: core.getInput('github-token')
};
}