mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-14 16:46:43 +00:00
support alternative network modes (#209)
This commit is contained in:
@@ -31,9 +31,13 @@ export async function prepareJob(
|
||||
core.info('No containers exist, skipping hook invocation')
|
||||
exit(0)
|
||||
}
|
||||
const networkName = generateNetworkName()
|
||||
// Create network
|
||||
await networkCreate(networkName)
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user