mirror of
https://gitea.com/docker/setup-qemu-action.git
synced 2025-02-23 20:20:39 +07:00
This allows users to specify platform in a more humane way, for example: ```yaml env: # equals to `linux/amd64, linux/arm/v6` platforms: > linux/amd64, linux/arm/v6 - uses: docker/setup-qemu-action@v2 with: platforms: ${{ env.PLATFORMS }} ``` Signed-off-by: Chocobo1 <Chocobo1@users.noreply.github.com>
19 lines
361 B
TypeScript
19 lines
361 B
TypeScript
import * as core from '@actions/core';
|
|
|
|
export interface Inputs {
|
|
image: string;
|
|
platforms: string;
|
|
}
|
|
|
|
export function getInputs(): Inputs {
|
|
return {
|
|
image: core.getInput('image') || 'tonistiigi/binfmt:latest',
|
|
platforms:
|
|
core
|
|
.getInput('platforms')
|
|
.split(',')
|
|
.map(v => v.trim())
|
|
.join(',') || 'all'
|
|
};
|
|
}
|