mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-14 08:36:45 +00:00
fixed interface for hooklib and example repos
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
"args": {
|
"args": {
|
||||||
"container": {
|
"container": {
|
||||||
"image": "node:14.16",
|
"image": "node:14.16",
|
||||||
"workingDirectory": "/__w/thboop-test2/thboop-test2",
|
"workingDirectory": "/__w/repo/repo",
|
||||||
"createOptions": "--cpus 1",
|
"createOptions": "--cpus 1",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"NODE_ENV": "development"
|
"NODE_ENV": "development"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"echo \"hello world2\""
|
"echo \"hello world2\""
|
||||||
],
|
],
|
||||||
"entryPoint": "bash",
|
"entryPoint": "bash",
|
||||||
"workingDirectory": "/__w/thboop-test2/thboop-test2",
|
"workingDirectory": "/__w/repo/repo",
|
||||||
"createOptions": "--cpus 1",
|
"createOptions": "--cpus 1",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"NODE_ENV": "development"
|
"NODE_ENV": "development"
|
||||||
|
|||||||
@@ -21,6 +21,6 @@
|
|||||||
"/foo/bar",
|
"/foo/bar",
|
||||||
"bar/foo"
|
"bar/foo"
|
||||||
],
|
],
|
||||||
"workingDirectory": "/__w/thboop-test2/thboop-test2"
|
"workingDirectory": "/__w/repo/repo"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,6 +34,7 @@ export interface ContainerInfo {
|
|||||||
createOptions?: string
|
createOptions?: string
|
||||||
environmentVariables?: { [key: string]: string }
|
environmentVariables?: { [key: string]: string }
|
||||||
userMountVolumes?: Mount[]
|
userMountVolumes?: Mount[]
|
||||||
|
systemMountVolumes?: Mount[]
|
||||||
registry?: Registry
|
registry?: Registry
|
||||||
portMappings?: string[]
|
portMappings?: string[]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { prepareJob, cleanupJob, runScriptStep } from '../src/hooks'
|
|
||||||
import { TestHelper } from './test-setup'
|
|
||||||
import * as path from 'path'
|
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
|
import * as path from 'path'
|
||||||
|
import { cleanupJob, prepareJob, runScriptStep } from '../src/hooks'
|
||||||
|
import { TestHelper } from './test-setup'
|
||||||
|
|
||||||
jest.useRealTimers()
|
jest.useRealTimers()
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ describe('Run script step', () => {
|
|||||||
NODE_ENV: 'development'
|
NODE_ENV: 'development'
|
||||||
},
|
},
|
||||||
prependPath: ['/foo/bar', 'bar/foo'],
|
prependPath: ['/foo/bar', 'bar/foo'],
|
||||||
workingDirectory: '/__w/thboop-test2/thboop-test2'
|
workingDirectory: '/__w/repo/repo'
|
||||||
}
|
}
|
||||||
const state = {
|
const state = {
|
||||||
jobPod: prepareJobOutputData.state.jobPod
|
jobPod: prepareJobOutputData.state.jobPod
|
||||||
|
|||||||
Reference in New Issue
Block a user