fixed issue with finding package.json by setting GITHUB_WORKSPACE

This commit is contained in:
Sam McCants 2020-02-18 09:53:44 +00:00
parent 90b468b82d
commit 88132dbe8e
1 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,8 @@ 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}`)
process.env.GITHUB_WORKSPACE = `${process.env.GITHUB_WORKSPACE}/${process.env.PACKAGEJSON_DIR}`
process.chdir(process.env.GITHUB_WORKSPACE)
}
// Run your GitHub Action!