Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ inputs:
cacheTo:
required: false
description: Specify the image to cache the built image to
prebuild:
required: false
default: false
description: Set to true to prebuild the dev container image. This is useful for speeding up the first run of the dev container.
outputs:
runCmdOutput:
description: The output of the command specified in the runCmd input
Expand Down
4 changes: 4 additions & 0 deletions common/src/dev-container-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ export interface DevContainerCliUpArgs {
env?: string[];
userDataFolder?: string;
additionalMounts?: string[];
prebuild?: boolean;
}
async function devContainerUp(
args: DevContainerCliUpArgs,
Expand Down Expand Up @@ -258,6 +259,9 @@ async function devContainerUp(
commandArgs.push('--mount', mount),
);
}
if (args.prebuild) {
commandArgs.push('--prebuild');
}
return await runSpecCliJsonCommand<DevContainerCliUpResult>({
args: commandArgs,
log,
Expand Down
2 changes: 2 additions & 0 deletions github-action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export async function runMain(): Promise<void> {
);
const userDataFolder: string = core.getInput('userDataFolder');
const mounts: string[] = core.getMultilineInput('mounts');
const prebuild: boolean = core.getBooleanInput('prebuild');

if (platform) {
const skopeoInstalled = await isSkopeoInstalled();
Expand Down Expand Up @@ -157,6 +158,7 @@ export async function runMain(): Promise<void> {
env: inputEnvsWithDefaults,
userDataFolder,
additionalMounts: mounts,
prebuild: prebuild,
};
const result = await devcontainer.up(args, log);
if (result.outcome !== 'success') {
Expand Down