Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions 15 github-action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ export async function runMain(): Promise<void> {
const userDataFolder: string = core.getInput('userDataFolder');
const mounts: string[] = core.getMultilineInput('mounts');

// Make inputs available to the post step by saving them to state
// Otherwise they aren't available when this action is being used in a nested composite action
core.saveState('imageName', imageName);
core.saveState('imageTag', imageTag);
core.saveState('push', core.getInput('push'));
core.saveState('platform', platform);

if (platform) {
const skopeoInstalled = await isSkopeoInstalled();
if (!skopeoInstalled) {
Expand Down Expand Up @@ -211,8 +218,8 @@ export async function runMain(): Promise<void> {
}

export async function runPost(): Promise<void> {
const pushOption = emptyStringAsUndefined(core.getInput('push'));
const imageName = emptyStringAsUndefined(core.getInput('imageName'));
const pushOption = emptyStringAsUndefined(core.getState('push'));
const imageName = emptyStringAsUndefined(core.getState('imageName'));
const refFilterForPush: string[] = core.getMultilineInput('refFilterForPush');
const eventFilterForPush: string[] =
core.getMultilineInput('eventFilterForPush');
Expand Down Expand Up @@ -252,7 +259,7 @@ export async function runPost(): Promise<void> {
}

const imageTag =
emptyStringAsUndefined(core.getInput('imageTag')) ?? 'latest';
emptyStringAsUndefined(core.getState('imageTag')) ?? 'latest';
const imageTagArray = imageTag.split(/\s*,\s*/);
if (!imageName) {
if (pushOption) {
Expand All @@ -262,7 +269,7 @@ export async function runPost(): Promise<void> {
return;
}

const platform = emptyStringAsUndefined(core.getInput('platform'));
const platform = emptyStringAsUndefined(core.getState('platform'));
if (platform) {
for (const tag of imageTagArray) {
core.info(`Copying multiplatform image '${imageName}:${tag}'...`);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.