mirror of
https://github.com/actions/runner.git
synced 2025-12-29 12:57:29 +08:00
.
This commit is contained in:
@@ -1089,15 +1089,26 @@ function run() {
|
||||
// -v "/home/runner/work/_temp/_github_home":"/github/home"
|
||||
// -v "/home/runner/work/_temp/_github_workflow":"/github/workflow"
|
||||
// --entrypoint "tail" node:10.16-jessie "-f" "/dev/null"
|
||||
const containerId = yield exec.getExecOutput('podman', [
|
||||
'create',
|
||||
// `--workdir ${jobContainer.containerWorkDirectory}`,
|
||||
`--network=${networkName}`,
|
||||
// `-v /Users/ting/Desktop/runner/_layout/_work:/__w`,
|
||||
`--entrypoint=${jobContainer.containerEntryPoint}`,
|
||||
`${containerImage}`,
|
||||
`${jobContainer.containerEntryPointArgs}`
|
||||
]);
|
||||
const creatArgs = ['create'];
|
||||
creatArgs.push(`--workdir=${jobContainer.containerWorkDirectory}`);
|
||||
creatArgs.push(`--network=${networkName}`);
|
||||
creatArgs.push(`--entrypoint=${jobContainer.containerEntryPoint}`);
|
||||
for (const mountVolume of jobContainer.mountVolumes) {
|
||||
creatArgs.push(`-v=${mountVolume.sourceVolumePath}:${mountVolume.targetVolumePath}`);
|
||||
}
|
||||
creatArgs.push(containerImage);
|
||||
creatArgs.push(jobContainer.containerEntryPointArgs);
|
||||
core.debug(JSON.stringify(creatArgs));
|
||||
// const containerId = await exec.getExecOutput('podman', [
|
||||
// 'create',
|
||||
// // `--workdir ${jobContainer.containerWorkDirectory}`,
|
||||
// `--network=${networkName}`,
|
||||
// // `-v=/Users/ting/Desktop/runner/_layout/_work:/__w`,
|
||||
// `--entrypoint=${jobContainer.containerEntryPoint}`,
|
||||
// `${containerImage}`,
|
||||
// `${jobContainer.containerEntryPointArgs}`
|
||||
// ])
|
||||
const containerId = yield exec.getExecOutput('podman', creatArgs);
|
||||
core.debug(JSON.stringify(containerId));
|
||||
// podman start {containerId}
|
||||
yield exec.exec('podman', ['start', containerId.stdout.trim()]);
|
||||
@@ -1109,7 +1120,7 @@ function run() {
|
||||
};
|
||||
const output = JSON.stringify({ CreationOutput: creationOutput });
|
||||
core.debug(output);
|
||||
process.stderr.write(output);
|
||||
process.stderr.write(`___CONTAINER_ENGINE_HANDLER_OUTPUT___${output}___CONTAINER_ENGINE_HANDLER_OUTPUT___`);
|
||||
}
|
||||
else if (command === 'Remove') {
|
||||
const removeInput = inputJson.removeInput;
|
||||
@@ -1122,7 +1133,7 @@ function run() {
|
||||
// else if (command === 'Exec') {
|
||||
// }
|
||||
yield exec.exec('podman', ['network', 'ls']);
|
||||
yield exec.exec('podman', ['network', 'ps', '-a']);
|
||||
yield exec.exec('podman', ['ps', '-a']);
|
||||
});
|
||||
}
|
||||
run();
|
||||
|
||||
Reference in New Issue
Block a user