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