Removed irrelevant repo variable

This commit is contained in:
Corey Butler 2020-01-30 17:25:31 -06:00
parent 409fd48cf1
commit e8fe08c417

View File

@ -6,8 +6,6 @@ const os = require('os')
async function run() {
try {
const { repo } = github.context
core.debug(
` Available environment variables:\n -> ${Object.keys(process.env)
.map(i => i + ' :: ' + process.env[i])
@ -23,6 +21,13 @@ async function run() {
core.debug(` Working Directory: ${process.env.GITHUB_WORKSPACE}:\n${dir}`)
if (!process.env.hasOwnProperty('INPUT_GITHUB_TOKEN') || process.env.INPUT_GITHUB_TOKEN.trim().length === 0) {
if (!process.env.hasOwnProperty('GITHUB_TOKEN')) {
core.setFailed('Invalid or missing GITHUB_TOKEN.')
return
}
}
const pkg_root = core.getInput('package_root', { required: false })
const pkgfile = path.join(process.env.GITHUB_WORKSPACE, pkg_root, 'package.json')
if (!fs.existsSync(pkgfile)) {
@ -63,13 +68,6 @@ async function run() {
// core.debug(` Detected version ${version}`)
if (!process.env.hasOwnProperty('INPUT_GITHUB_TOKEN') || process.env.INPUT_GITHUB_TOKEN.trim().length === 0) {
if (!process.env.hasOwnProperty('GITHUB_TOKEN')) {
core.setFailed('Invalid or missing GITHUB_TOKEN.')
return
}
}
// Check for existing tag
const git = new github.GitHub(process.env.INPUT_GITHUB_TOKEN || process.env.GITHUB_TOKEN)
const owner = process.env.GITHUB_ACTOR