Use ACTIONS_RUNNER_CONTAINER_HOOK_TEMPLATE to extend service containers (#134)

https://github.com/actions/runner-container-hooks/issues/132

Co-authored-by: Katarzyna Radkowska <katarzyna.radkowska@sabre.com>
This commit is contained in:
Katarzyna
2024-02-20 16:19:29 +01:00
committed by GitHub
parent af27abe1f7
commit 7223e1dbb2
5 changed files with 32 additions and 11 deletions

View File

@@ -26,7 +26,7 @@ import {
PodPhase,
fixArgs
} from '../k8s/utils'
import { JOB_CONTAINER_EXTENSION_NAME, JOB_CONTAINER_NAME } from './constants'
import { CONTAINER_EXTENSION_PREFIX, JOB_CONTAINER_NAME } from './constants'
export async function prepareJob(
args: PrepareJobArgs,
@@ -60,7 +60,7 @@ export async function prepareJob(
service,
generateContainerName(service.image),
false,
undefined
extension
)
})
}
@@ -235,7 +235,7 @@ export function createContainerSpec(
}
const from = extension.spec?.containers?.find(
c => c.name === JOB_CONTAINER_EXTENSION_NAME
c => c.name === CONTAINER_EXTENSION_PREFIX + name
)
if (from) {