Fixing issue with GITHUB_REPOSITORY being undefined in scheduled tests

This commit is contained in:
James Ives 2019-11-21 09:29:43 -05:00
parent 46e858d2a2
commit b3c23a476e
2 changed files with 7 additions and 2 deletions

View File

@ -17,7 +17,9 @@ exports.isTest = process.env.UNIT_TEST;
// Required action data.
exports.action = {
build: exports.folder,
gitHubRepository: repository ? repository.full_name : "",
gitHubRepository: repository && repository.full_name
? repository.full_name
: process.env.GITHUB_REPOSITORY,
gitHubToken: core.getInput("GITHUB_TOKEN"),
accessToken: core.getInput("ACCESS_TOKEN"),
branch: core.getInput("BRANCH"),

View File

@ -11,7 +11,10 @@ export const isTest = process.env.UNIT_TEST;
// Required action data.
export const action = {
build: folder,
gitHubRepository: repository ? repository.full_name : "",
gitHubRepository:
repository && repository.full_name
? repository.full_name
: process.env.GITHUB_REPOSITORY,
gitHubToken: core.getInput("GITHUB_TOKEN"),
accessToken: core.getInput("ACCESS_TOKEN"),
branch: core.getInput("BRANCH"),