Skip to content

Commit

Permalink
Merge pull request #49 from fafeichter/issue-48
Browse files Browse the repository at this point in the history
version bump is not pushed when tag should not pushed
  • Loading branch information
phips28 authored Oct 19, 2020
2 parents fce931e + 2882775 commit 7a69b98
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ Toolkit.run(async tools => {
'but that doesnt matter because you dont need that git commit, thats only for "actions/checkout@v1"')
}

const remoteRepo = `https://${process.env.GITHUB_ACTOR}:${process.env.GITHUB_TOKEN}@github.com/${process.env.GITHUB_REPOSITORY}.git`
if (process.env['INPUT_SKIP-TAG'] !== 'true') {
const remoteRepo = `https://${process.env.GITHUB_ACTOR}:${process.env.GITHUB_TOKEN}@github.com/${process.env.GITHUB_REPOSITORY}.git`
// console.log(Buffer.from(remoteRepo).toString('base64'))
await tools.runInWorkspace('git', ['tag', newVersion])
await tools.runInWorkspace('git', ['push', remoteRepo, '--follow-tags'])
await tools.runInWorkspace('git', ['push', remoteRepo, '--tags'])
} else {
await tools.runInWorkspace('git', ['push', remoteRepo])
}
} catch (e) {
tools.log.fatal(e)
Expand Down

0 comments on commit 7a69b98

Please sign in to comment.