Don't use runner binaries, instead document job container requirements

This commit is contained in:
Nikola Jokic
2025-11-07 15:29:40 +01:00
parent 2934de33f8
commit 37747d02a9
6 changed files with 47 additions and 108 deletions

View File

@@ -104,7 +104,7 @@ export async function runContainerStep(
try {
core.debug(`Executing container step script in pod ${podName}`)
return await execPodStep(
['/__e/sh', '-e', containerPath],
['sh', '-e', containerPath],
pod.metadata.name,
JOB_CONTAINER_NAME
)
@@ -133,7 +133,7 @@ function createContainerSpec(
podContainer.name = JOB_CONTAINER_NAME
podContainer.image = container.image
podContainer.workingDir = '/__w'
podContainer.command = ['/__e/tail']
podContainer.command = ['tail']
podContainer.args = DEFAULT_CONTAINER_ENTRY_POINT_ARGS
podContainer.volumeMounts = CONTAINER_VOLUMES

View File

@@ -169,41 +169,10 @@ export async function createContainerStepPod(
appPod.spec = new k8s.V1PodSpec()
appPod.spec.containers = [container]
appPod.spec.initContainers = [
{
name: 'fs-init',
image:
process.env.ACTIONS_RUNNER_IMAGE ||
'ghcr.io/actions/actions-runner:latest',
command: [
'bash',
'-c',
`sudo cp $(which sh) /mnt/externals/sh \
&& sudo cp $(which tail) /mnt/externals/tail \
&& sudo cp $(which env) /mnt/externals/env \
&& sudo chmod -R 777 /mnt/externals`
],
securityContext: {
runAsGroup: 1001,
runAsUser: 1001,
privileged: true
},
volumeMounts: [
{
name: EXTERNALS_VOLUME_NAME,
mountPath: '/mnt/externals'
}
]
}
]
appPod.spec.restartPolicy = 'Never'
appPod.spec.volumes = [
{
name: EXTERNALS_VOLUME_NAME,
emptyDir: {}
},
{
name: GITHUB_VOLUME_NAME,
emptyDir: {}