support alternative network modes (#209)

This commit is contained in:
Robin Bobbitt
2025-03-24 11:33:43 -04:00
committed by GitHub
parent 120636d3d7
commit d4c5425b22

View File

@@ -31,9 +31,13 @@ export async function prepareJob(
core.info('No containers exist, skipping hook invocation')
exit(0)
}
const networkName = generateNetworkName()
let networkName = process.env.ACTIONS_RUNNER_NETWORK_DRIVER
if (!networkName) {
networkName = generateNetworkName()
// Create network
await networkCreate(networkName)
}
// Create Job Container
let containerMetadata: ContainerMetadata | undefined = undefined