setup-qemu-action/src/context.ts
2025-02-02 22:13:36 +09:00

19 lines
521 B
TypeScript

import * as core from '@actions/core';
import {Util} from '@docker/actions-toolkit/lib/util';
export interface Inputs {
image: string;
platforms: string;
cacheImage: boolean;
cacheImagePath: string;
}
export function getInputs(): Inputs {
return {
image: core.getInput('image') || 'docker.io/tonistiigi/binfmt:latest',
platforms: Util.getInputList('platforms').join(',') || 'all',
cacheImage: core.getBooleanInput('cache-image'),
cacheImagePath: core.getInput('cache-image-path') || ''
};
}