Skip to content

Commit

Permalink
Leverage INPUT references since to account for bug in docker-based im…
Browse files Browse the repository at this point in the history
…age runner.
  • Loading branch information
coreybutler committed Apr 2, 2020
1 parent f6933fd commit 301ef92
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ async function run () {
const { owner, repo } = context.repo

// Get the inputs from the workflow file: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
const id = core.getInput('release_id', { required: false })
const tag = core.getInput('tag', { required: false })
core.debug(`ID: "${id}", Tag: "${tag}"`)
const id = process.env.INPUT_RELEASE_ID || '' // core.getInput('release_id', { required: false })
const tag = process.env.INPUT_TAG || '' // core.getInput('tag', { required: false })
const deleteOrphan = (process.env.INPUT_DELETE_ORPHAN_TAG || '').trim().toLowerCase() === 'true'

if (!id && !tag) {
core.setFailed('At least one of the following inputs must be defined: release_id or tag.')
return
Expand All @@ -32,7 +33,7 @@ async function run () {
}

if (!data) {
if (core.getInput('delete_orphan_tag', { required: false }) !== '') {
if (deleteOrphan) {
const deleteTagResponse = await github.git.deleteRef({
owner,
repo,
Expand Down

0 comments on commit 301ef92

Please sign in to comment.