remove head and heads from branch prefix

pull/353/head
Frostebite 2022-04-06 22:12:02 +01:00
parent 912cad6b2a
commit 86e4c7c856
5 changed files with 5 additions and 6 deletions

4
dist/index.js vendored
View File

@ -2833,7 +2833,7 @@ class CloudRunnerBuildCommandProcessor {
${commands}
${hooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
echo "end of cloud runner job"
echo"---${buildParameters.logId}"`;
echo "---${buildParameters.logId}"`;
}
static getHooks(customJobHooks) {
const experimentHooks = customJobHooks;
@ -4216,7 +4216,7 @@ class Input {
}
static get branch() {
if (Input.getInput(`GITHUB_REF`)) {
return Input.getInput(`GITHUB_REF`).replace('refs/', '').replace(`head/`, '');
return Input.getInput(`GITHUB_REF`).replace('refs/', '').replace(`head/`, '').replace(`heads/`, '');
}
else if (Input.getInput('branch')) {
return Input.getInput('branch');

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -219,4 +219,3 @@ Metadata:
target:
id: aece53ae-b82d-4267-bc16-ed964b05db27
z: 13

View File

@ -17,7 +17,7 @@ export class CloudRunnerBuildCommandProcessor {
${commands}
${hooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
echo "end of cloud runner job"
echo"---${buildParameters.logId}"`;
echo "---${buildParameters.logId}"`;
}
public static getHooks(customJobHooks): Hook[] {

View File

@ -51,7 +51,7 @@ class Input {
}
static get branch() {
if (Input.getInput(`GITHUB_REF`)) {
return Input.getInput(`GITHUB_REF`).replace('refs/', '').replace(`head/`, '');
return Input.getInput(`GITHUB_REF`).replace('refs/', '').replace(`head/`, '').replace(`heads/`, '');
} else if (Input.getInput('branch')) {
return Input.getInput('branch');
} else {