Run docker from javascript

This commit is contained in:
Webber
2019-12-22 15:05:15 +01:00
committed by Webber Takken
parent 9a639e97e3
commit 2ab738c083
19 changed files with 1013 additions and 181 deletions
+30
View File
@@ -0,0 +1,30 @@
import path from 'path';
export default class Action {
static get supportedPlatforms() {
return ['linux'];
}
static get name() {
return 'unity-builder';
}
static get rootFolder() {
return path.dirname(path.dirname(__dirname));
}
static get dockerfile() {
return `${Action.rootFolder}/Dockerfile`;
}
static get workspace() {
return process.env.GITHUB_WORKSPACE;
}
static checkCompatibility() {
const currentPlatform = process.platform;
if (!Action.supportedPlatforms.includes(currentPlatform)) {
throw new Error(`Currently ${currentPlatform}-platform is not supported`);
}
}
}