Skip to content

Commit

Permalink
Merge pull request #6 from phips28/PACKAGEJSON_DIR
Browse files Browse the repository at this point in the history
custom PACKAGEJSON_DIR
  • Loading branch information
phips28 authored Jan 13, 2020
2 parents eb79e71 + 6054007 commit 17c3528
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const { Toolkit } = require('actions-toolkit')
const { execSync } = require('child_process')

// Change working directory if user defined PACKAGEJSON_DIR
if (process.env.PACKAGEJSON_DIR) {
process.chdir(`${process.env.GITHUB_WORKSPACE}/${process.env.PACKAGEJSON_DIR}`)
}

// Run your GitHub Action!
Toolkit.run(async tools => {
const pkg = tools.getPackageJSON()
Expand Down

0 comments on commit 17c3528

Please sign in to comment.