Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Use context for inputs
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
- Loading branch information
CrazyMax
committed
Oct 8, 2022
1 parent
8c1e35a
commit 25725d8
Showing
5 changed files
with
60 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as core from '@actions/core'; | ||
import {issueCommand} from '@actions/core/lib/command'; | ||
|
||
export interface Inputs { | ||
image: string; | ||
platforms: string; | ||
} | ||
|
||
export function getInputs(): Inputs { | ||
return { | ||
image: core.getInput('image') || 'tonistiigi/binfmt:latest', | ||
platforms: core.getInput('platforms') || 'all' | ||
}; | ||
} | ||
|
||
// FIXME: Temp fix https://github.com/actions/toolkit/issues/777 | ||
export function setOutput(name: string, value: unknown): void { | ||
issueCommand('set-output', {name}, value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters