Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support workdir field #6

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist/index.js: src/index.js
npm install
node_modules/.bin/ncc build $^ --target es2020
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ inputs:
description: The git ref to build. This will usually be a sha, but can be a branch or anything supported by git checkout.
token:
description: Pass `github.token` if this is a private repository.
workdir:
description: Use this if your module is not in the repo root. If you pass this, the `meta-path` will be relative to this workdir, not to repo root.

runs:
using: node20
Expand Down
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26971,6 +26971,9 @@ function parseBuildId(stdout) {
if (getInput('token')) {
startArgs.push('--token', getInput('token'));
}
if (getInput('workdir')) {
startArgs.push('--workdir', getInput('workdir'));
}
const spawnRet = spawnSync(cliPath, startArgs);
checkSpawnSync(spawnRet);
const buildId = parseBuildId(spawnRet.stdout);
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ function parseBuildId(stdout) {
if (getInput('token')) {
startArgs.push('--token', getInput('token'));
}
if (getInput('workdir')) {
startArgs.push('--workdir', getInput('workdir'));
}
const spawnRet = spawnSync(cliPath, startArgs);
checkSpawnSync(spawnRet);
const buildId = parseBuildId(spawnRet.stdout);
Expand Down
Loading