mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-06-15 04:26:48 -07:00
Run docker from javascript
This commit is contained in:
@@ -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`);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user