Do not serialize custom job parameter

pull/461/head
Frostebite 2022-09-28 00:23:16 +01:00
parent b1c3214d79
commit daa844d053
4 changed files with 15 additions and 7 deletions

6
dist/index.js vendored
View File

@ -3639,7 +3639,9 @@ class LocalDockerCloudRunner {
let myOutput = '';
// core.info(JSON.stringify({ workspace, actionFolder, ...this.buildParameters, ...content }, undefined, 4));
const entrypointFilePath = `start.sh`;
fs_1.writeFileSync(`${workspace}/${entrypointFilePath}`, commands, {
fs_1.writeFileSync(`${workspace}/${entrypointFilePath}`, `#!/bin/bash
set -e
${commands}`, {
flag: 'w',
});
yield docker_1.default.run(image, Object.assign({ workspace, actionFolder }, this.buildParameters), false, `"chmod +x /github/workspace/${entrypointFilePath} && /github/workspace/${entrypointFilePath}"`, content, {
@ -4770,7 +4772,7 @@ class TaskParameterSerializer {
static readBuildParameterFromEnvironment() {
const buildParameters = new build_parameters_1.default();
const keys = [
...new Set(Object.keys(process.env)
...new Set(Object.getOwnPropertyNames(process.env)
.filter((x) => !this.blocked.has(x) && x.startsWith('GAMECI_'))
.map((x) => TaskParameterSerializer.UndoEnvVarFormat(x))),
];

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -87,9 +87,15 @@ class LocalDockerCloudRunner implements ProviderInterface {
// core.info(JSON.stringify({ workspace, actionFolder, ...this.buildParameters, ...content }, undefined, 4));
const entrypointFilePath = `start.sh`;
writeFileSync(`${workspace}/${entrypointFilePath}`, commands, {
flag: 'w',
});
writeFileSync(
`${workspace}/${entrypointFilePath}`,
`#!/bin/bash
set -e
${commands}`,
{
flag: 'w',
},
);
await Docker.run(
image,

View File

@ -84,7 +84,7 @@ export class TaskParameterSerializer {
const buildParameters = new BuildParameters();
const keys = [
...new Set(
Object.keys(process.env)
Object.getOwnPropertyNames(process.env)
.filter((x) => !this.blocked.has(x) && x.startsWith('GAMECI_'))
.map((x) => TaskParameterSerializer.UndoEnvVarFormat(x)),
),