This commit is contained in:
TingluoHuang
2021-10-14 15:11:17 -04:00
parent 493a2a0bf7
commit 029106a1dc
3 changed files with 21 additions and 5 deletions

View File

@@ -79,11 +79,19 @@ async function run(): Promise<void> {
core.debug(output)
process.stderr.write(output)
} else if (command === 'Remove') {
const removeInput = inputJson.removeInput
core.debug(JSON.stringify(removeInput))
const jobContainerId = removeInput.jobContainerId
const network = removeInput.network
await exec.exec('podman', ['rm', '-f', jobContainerId])
await exec.exec('podman', ['network', 'rm', '-f', network])
}
// else if (command === 'Remove') {
// } else if (command === 'Exec') {
// else if (command === 'Exec') {
// }
await exec.exec('podman', ['network', 'ls'])
await exec.exec('podman', ['network', 'ps', '-a'])
}
run()

View File

@@ -1111,10 +1111,18 @@ function run() {
core.debug(output);
process.stderr.write(output);
}
// else if (command === 'Remove') {
// } else if (command === 'Exec') {
else if (command === 'Remove') {
const removeInput = inputJson.removeInput;
core.debug(JSON.stringify(removeInput));
const jobContainerId = removeInput.jobContainerId;
const network = removeInput.network;
yield exec.exec('podman', ['rm', '-f', jobContainerId]);
yield exec.exec('podman', ['network', 'rm', '-f', network]);
}
// else if (command === 'Exec') {
// }
yield exec.exec('podman', ['network', 'ls']);
yield exec.exec('podman', ['network', 'ps', '-a']);
});
}
run();

View File

@@ -123,7 +123,7 @@ namespace GitHub.Runner.Worker
container.ContainerWorkDirectory = container.TranslateToContainerPath(workingDirectory);
container.ContainerEntryPoint = "tail";
container.ContainerEntryPointArgs = "\"-f\" \"/dev/null\"";
container.ContainerEntryPointArgs = "-f /dev/null";
}
}