Set build args for container
This commit is contained in:
17
src/index.js
17
src/index.js
@@ -10,16 +10,29 @@ async function action() {
|
||||
|
||||
// Input variables specified in workflows using "with" prop.
|
||||
const projectPath = core.getInput('projectPath', { default: './' });
|
||||
const buildTarget = core.getInput('buildTarget', { default: 'WebGL' });
|
||||
const targetPlatform = core.getInput('targetPlatform', { default: 'WebGL' });
|
||||
const unityVersion = core.getInput('unityVersion', { default: '2019.2.11f1' });
|
||||
const buildName = core.getInput('buildName', { default: 'TestBuild' });
|
||||
const buildsPath = core.getInput('buildsPath', { default: 'build' });
|
||||
const buildMethod = core.getInput('buildMethod', { default: '' });
|
||||
|
||||
// Determine image
|
||||
const IMAGE_UNITY_VERSION = unityVersion;
|
||||
const IMAGE_TARGET_PLATFORM = targetPlatform.toLowerCase();
|
||||
|
||||
// Run appropriate docker image with given args
|
||||
const bootstrapper = path.join(__dirname, 'run-unity-builder.sh');
|
||||
await exec(`ls ${bootstrapper}`);
|
||||
await exec(`chmod +x ${bootstrapper}`);
|
||||
await exec(bootstrapper, [projectPath, buildTarget, buildName, buildsPath, buildMethod]);
|
||||
await exec(bootstrapper, [
|
||||
IMAGE_UNITY_VERSION,
|
||||
IMAGE_TARGET_PLATFORM,
|
||||
projectPath,
|
||||
targetPlatform,
|
||||
buildName,
|
||||
buildsPath,
|
||||
buildMethod,
|
||||
]);
|
||||
}
|
||||
|
||||
action().catch(error => {
|
||||
|
||||
Reference in New Issue
Block a user