Skip to content

Commit

Permalink
feat: skip_install option to skip asdf install on setup (#536)
Browse files Browse the repository at this point in the history
Signed-off-by: aeddi <[email protected]>
Co-authored-by: aeddi <[email protected]>
  • Loading branch information
jthegedus and aeddi authored Mar 15, 2023
1 parent 5cd7f52 commit c926367
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 8 deletions.
4 changes: 4 additions & 0 deletions install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ inputs:
description: asdf branch to clone
required: false
default: master
skip_install:
description: setup env without installing asdf
required: false
default: false
8 changes: 6 additions & 2 deletions install/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions plugin-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ inputs:
description: asdf branch to clone
required: false
default: master
skip_install:
description: setup env without installing asdf
required: false
default: false
github_token:
description: Token used to avoid rate limit when asdf calls the GitHub API
required: false
Expand Down
8 changes: 6 additions & 2 deletions plugin-test/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions plugins-add/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: asdf branch to clone
required: false
default: master
skip_install:
description: setup env without installing asdf
required: false
default: false
tool_versions:
description:
If present, this value will be written to the .tool-versions file.
Expand Down
8 changes: 6 additions & 2 deletions plugins-add/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ inputs:
description: asdf branch to clone
required: false
default: master
skip_install:
description: setup env without installing asdf
required: false
default: false
8 changes: 6 additions & 2 deletions setup/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export async function setupAsdf(): Promise<void> {
core.exportVariable("ASDF_DATA_DIR", asdfDir);
core.addPath(`${asdfDir}/bin`);
core.addPath(`${asdfDir}/shims`);
const skip = core.getBooleanInput("skip_install", { required: true });
if (skip) {
return;
}
core.info(`Cloning asdf into ASDF_DIR: ${asdfDir}`);
const branch = core.getInput("asdf_branch", { required: true });
await exec.exec("git", [
Expand Down

0 comments on commit c926367

Please sign in to comment.