diff --git a/dist/index.js b/dist/index.js index 5f111c02..d5e02606 100644 --- a/dist/index.js +++ b/dist/index.js @@ -16022,7 +16022,7 @@ const setDynamicVars = () => { context.ACTOR = github.context.actor context.REF = github.context.ref context.SHA = github.context.sha - context.BRANCH = github.context.ref.substr(11) + context.BRANCH = github.context.ref.substring('refs/heads/'.length) } } @@ -16245,7 +16245,7 @@ const { SHA, USER, REPOSITORY, - REF, + BRANCH, TRIM_COMMIT_MESSAGE, BUILD_ENV, PREBUILT, @@ -16286,7 +16286,7 @@ const init = () => { `githubCommitMessage=${ TRIM_COMMIT_MESSAGE ? commit.commitMessage.split(/\r?\n/)[0] : commit.commitMessage }`, `githubCommitOrg=${ USER }`, `githubCommitRepo=${ REPOSITORY }`, - `githubCommitRef=${ REF }`, + `githubCommitRef=${ BRANCH }`, `githubCommitSha=${ SHA }`, `githubOrg=${ USER }`, `githubRepo=${ REPOSITORY }`, diff --git a/src/config.js b/src/config.js index 2f2eb22b..9e6985b1 100644 --- a/src/config.js +++ b/src/config.js @@ -136,7 +136,7 @@ const setDynamicVars = () => { context.ACTOR = github.context.actor context.REF = github.context.ref context.SHA = github.context.sha - context.BRANCH = github.context.ref.substr(11) + context.BRANCH = github.context.ref.substring('refs/heads/'.length) } } diff --git a/src/vercel.js b/src/vercel.js index 9370e8d9..17e9720b 100644 --- a/src/vercel.js +++ b/src/vercel.js @@ -11,7 +11,7 @@ const { SHA, USER, REPOSITORY, - REF, + BRANCH, TRIM_COMMIT_MESSAGE, BUILD_ENV, PREBUILT, @@ -52,7 +52,7 @@ const init = () => { `githubCommitMessage=${ TRIM_COMMIT_MESSAGE ? commit.commitMessage.split(/\r?\n/)[0] : commit.commitMessage }`, `githubCommitOrg=${ USER }`, `githubCommitRepo=${ REPOSITORY }`, - `githubCommitRef=${ REF }`, + `githubCommitRef=${ BRANCH }`, `githubCommitSha=${ SHA }`, `githubOrg=${ USER }`, `githubRepo=${ REPOSITORY }`,