mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-14 08:36:45 +00:00
Do not overwrite entrypoint if it has already been set or if it is Service container (#83)
This commit is contained in:
@@ -40,7 +40,7 @@ export async function prepareJob(
|
|||||||
if (!container?.image) {
|
if (!container?.image) {
|
||||||
core.info('No job container provided, skipping')
|
core.info('No job container provided, skipping')
|
||||||
} else {
|
} else {
|
||||||
setupContainer(container)
|
setupContainer(container, true)
|
||||||
|
|
||||||
const configLocation = await registryLogin(container.registry)
|
const configLocation = await registryLogin(container.registry)
|
||||||
try {
|
try {
|
||||||
@@ -174,9 +174,11 @@ function generateResponseFile(
|
|||||||
writeToResponseFile(responseFile, JSON.stringify(response))
|
writeToResponseFile(responseFile, JSON.stringify(response))
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupContainer(container): void {
|
function setupContainer(container, jobContainer = false): void {
|
||||||
|
if (!container.entryPoint && jobContainer) {
|
||||||
container.entryPointArgs = [`-f`, `/dev/null`]
|
container.entryPointArgs = [`-f`, `/dev/null`]
|
||||||
container.entryPoint = 'tail'
|
container.entryPoint = 'tail'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateNetworkName(): string {
|
function generateNetworkName(): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user