Set build args for container

This commit is contained in:
Webber
2019-12-21 13:56:00 +01:00
committed by Webber Takken
parent dccdec9d3b
commit 454ff6054c
5 changed files with 51 additions and 26 deletions

View File

@@ -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 => {