Merge pull request #6 from phips28/PACKAGEJSON_DIR

custom PACKAGEJSON_DIR
This commit is contained in:
Phil 2020-01-13 15:05:44 +01:00 committed by GitHub
commit 17c35281d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,11 @@
const { Toolkit } = require('actions-toolkit') const { Toolkit } = require('actions-toolkit')
const { execSync } = require('child_process') 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! // Run your GitHub Action!
Toolkit.run(async tools => { Toolkit.run(async tools => {
const pkg = tools.getPackageJSON() const pkg = tools.getPackageJSON()