mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-16 09:46:43 +00:00
refactored tests and added docker build test, repaired state.network
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
/* eslint-disable import/no-commonjs */
|
||||
import * as core from '@actions/core'
|
||||
import { env } from 'process'
|
||||
// Import this way otherwise typescript has errors
|
||||
const exec = require('@actions/exec')
|
||||
|
||||
@@ -42,6 +43,12 @@ export function sanitize(val: string): string {
|
||||
return newNameBuilder.join('')
|
||||
}
|
||||
|
||||
export function checkEnvironment(): void {
|
||||
if (!env.GITHUB_WORKSPACE) {
|
||||
throw new Error('GITHUB_WORKSPACE is not set')
|
||||
}
|
||||
}
|
||||
|
||||
// isAlpha accepts single character and checks if
|
||||
// that character is [a-zA-Z]
|
||||
function isAlpha(val: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user