mirror of
https://github.com/ButlerLogic/action-autotag.git
synced 2024-11-22 08:11:07 +07:00
Added environment variable support for GITHUB_TOKEN
This commit is contained in:
parent
e011fb10da
commit
5f67dd4d79
@ -28,12 +28,14 @@ async function run() {
|
||||
core.debug(` Detected version ${pkg.version}`)
|
||||
|
||||
if (!process.env.hasOwnProperty('INPUT_GITHUB_TOKEN') || process.env.INPUT_GITHUB_TOKEN.trim().length === 0) {
|
||||
core.setFailed('Invalid or missing GITHUB_TOKEN.')
|
||||
return
|
||||
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)
|
||||
const git = new github.GitHub(process.env.INPUT_GITHUB_TOKEN || process.env.GITHUB_TOKEN)
|
||||
const owner = process.env.GITHUB_ACTOR
|
||||
const repo = process.env.GITHUB_REPOSITORY.split('/').pop()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user