mirror of
https://github.com/FranzDiebold/github-env-vars-action.git
synced 2024-11-26 10:41:06 -05:00
commit
61e09f04f9
3 changed files with 12 additions and 4 deletions
|
@ -88,6 +88,12 @@ steps:
|
||||||
echo "CI_BASE_REF=$CI_BASE_REF"
|
echo "CI_BASE_REF=$CI_BASE_REF"
|
||||||
echo "CI_SHA_SHORT=$CI_SHA_SHORT"
|
echo "CI_SHA_SHORT=$CI_SHA_SHORT"
|
||||||
echo "CI_SHA=$CI_SHA"
|
echo "CI_SHA=$CI_SHA"
|
||||||
|
echo "CI_PR_SHA_SHORT=$CI_PR_SHA_SHORT"
|
||||||
|
echo "CI_PR_SHA=$CI_PR_SHA"
|
||||||
|
echo "CI_PR_NUMBER=$CI_PR_NUMBER"
|
||||||
|
echo "CI_PR_ID=$CI_PR_ID"
|
||||||
|
echo "CI_PR_TITLE=$CI_PR_TITLE"
|
||||||
|
echo "CI_PR_DESCRIPTION=$CI_PR_DESCRIPTION"
|
||||||
echo "CI_ACTOR=$CI_ACTOR"
|
echo "CI_ACTOR=$CI_ACTOR"
|
||||||
echo "CI_EVENT_NAME=$CI_EVENT_NAME"
|
echo "CI_EVENT_NAME=$CI_EVENT_NAME"
|
||||||
echo "CI_RUN_ID=$CI_RUN_ID"
|
echo "CI_RUN_ID=$CI_RUN_ID"
|
||||||
|
|
5
dist/index.js
vendored
5
dist/index.js
vendored
|
@ -192,7 +192,7 @@ try {
|
||||||
const pullRequest = github.context.payload &&
|
const pullRequest = github.context.payload &&
|
||||||
github.context.payload.pull_request;
|
github.context.payload.pull_request;
|
||||||
if (pullRequest) {
|
if (pullRequest) {
|
||||||
const prSha = github.event.pull_request.head.sha;
|
const prSha = pullRequest.head.sha;
|
||||||
core.exportVariable('CI_PR_SHA_SHORT', getShaShort(prSha));
|
core.exportVariable('CI_PR_SHA_SHORT', getShaShort(prSha));
|
||||||
core.info(`Set CI_PR_SHA_SHORT=${process.env.CI_PR_SHA_SHORT}`);
|
core.info(`Set CI_PR_SHA_SHORT=${process.env.CI_PR_SHA_SHORT}`);
|
||||||
|
|
||||||
|
@ -215,7 +215,8 @@ try {
|
||||||
core.info(`Set CI_PR_DESCRIPTION=${process.env.CI_PR_DESCRIPTION}`);
|
core.info(`Set CI_PR_DESCRIPTION=${process.env.CI_PR_DESCRIPTION}`);
|
||||||
} else {
|
} else {
|
||||||
core.info('No pull request. ' +
|
core.info('No pull request. ' +
|
||||||
'Cannot set "CI_PR_TITLE" and "CI_PR_DESCRIPTION".');
|
'Cannot set "CI_PR_SHA_SHORT", "CI_PR_SHA", "CI_PR_NUMBER", ' +
|
||||||
|
'"CI_PR_ID", "CI_PR_TITLE" and "CI_PR_DESCRIPTION".');
|
||||||
}
|
}
|
||||||
|
|
||||||
const actor = process.env.GITHUB_ACTOR;
|
const actor = process.env.GITHUB_ACTOR;
|
||||||
|
|
5
index.js
5
index.js
|
@ -186,7 +186,7 @@ try {
|
||||||
const pullRequest = github.context.payload &&
|
const pullRequest = github.context.payload &&
|
||||||
github.context.payload.pull_request;
|
github.context.payload.pull_request;
|
||||||
if (pullRequest) {
|
if (pullRequest) {
|
||||||
const prSha = github.event.pull_request.head.sha;
|
const prSha = pullRequest.head.sha;
|
||||||
core.exportVariable('CI_PR_SHA_SHORT', getShaShort(prSha));
|
core.exportVariable('CI_PR_SHA_SHORT', getShaShort(prSha));
|
||||||
core.info(`Set CI_PR_SHA_SHORT=${process.env.CI_PR_SHA_SHORT}`);
|
core.info(`Set CI_PR_SHA_SHORT=${process.env.CI_PR_SHA_SHORT}`);
|
||||||
|
|
||||||
|
@ -209,7 +209,8 @@ try {
|
||||||
core.info(`Set CI_PR_DESCRIPTION=${process.env.CI_PR_DESCRIPTION}`);
|
core.info(`Set CI_PR_DESCRIPTION=${process.env.CI_PR_DESCRIPTION}`);
|
||||||
} else {
|
} else {
|
||||||
core.info('No pull request. ' +
|
core.info('No pull request. ' +
|
||||||
'Cannot set "CI_PR_TITLE" and "CI_PR_DESCRIPTION".');
|
'Cannot set "CI_PR_SHA_SHORT", "CI_PR_SHA", "CI_PR_NUMBER", ' +
|
||||||
|
'"CI_PR_ID", "CI_PR_TITLE" and "CI_PR_DESCRIPTION".');
|
||||||
}
|
}
|
||||||
|
|
||||||
const actor = process.env.GITHUB_ACTOR;
|
const actor = process.env.GITHUB_ACTOR;
|
||||||
|
|
Loading…
Reference in a new issue