2022-10-12 05:07:13 +00:00
|
|
|
import * as core from '@actions/core';
|
2023-02-20 21:32:55 +00:00
|
|
|
import {Util} from '@docker/actions-toolkit/lib/util';
|
2020-10-25 01:25:23 +00:00
|
|
|
|
|
|
|
export interface Inputs {
|
|
|
|
images: string[];
|
2021-03-29 11:04:53 +00:00
|
|
|
tags: string[];
|
|
|
|
flavor: string[];
|
|
|
|
labels: string[];
|
2020-10-25 01:25:23 +00:00
|
|
|
sepTags: string;
|
|
|
|
sepLabels: string;
|
2021-04-29 22:51:48 +00:00
|
|
|
bakeTarget: string;
|
2020-10-25 01:25:23 +00:00
|
|
|
githubToken: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getInputs(): Inputs {
|
|
|
|
return {
|
2023-02-20 21:32:55 +00:00
|
|
|
images: Util.getInputList('images', {ignoreComma: true}),
|
|
|
|
tags: Util.getInputList('tags', {ignoreComma: true}),
|
|
|
|
flavor: Util.getInputList('flavor', {ignoreComma: true}),
|
|
|
|
labels: Util.getInputList('labels', {ignoreComma: true}),
|
2022-10-07 20:45:46 +00:00
|
|
|
sepTags: core.getInput('sep-tags', {trimWhitespace: false}) || `\n`,
|
|
|
|
sepLabels: core.getInput('sep-labels', {trimWhitespace: false}) || `\n`,
|
2021-05-10 13:54:35 +00:00
|
|
|
bakeTarget: core.getInput('bake-target') || `docker-metadata-action`,
|
2020-10-25 01:25:23 +00:00
|
|
|
githubToken: core.getInput('github-token')
|
|
|
|
};
|
|
|
|
}
|