Skip to content

Commit

Permalink
Merge pull request #421 from spowelljr/addOptionToNotStartMinikube
Browse files Browse the repository at this point in the history
Add option to not start minikube cluster
  • Loading branch information
medyagh authored Apr 9, 2024
2 parents 878e6a1 + eed2dd4 commit 317d923
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ By default setup-minikube caches the ISO, kicbase, and preload using GitHub Acti

## Configurable Fields

<details>
<summary>start (optional)</summary>
<pre>
- default: true
- options:
- true
- false
</pre>
</details>

<details>
<summary>minikube-version (optional)</summary>
<pre>
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ branding:
icon: 'box'
color: 'blue'
inputs:
start:
description: 'Start minikube after install is complete'
required: false
default: true
cache:
description: 'Cache ISO, kicbase, and preloads to speed up starting minikube'
required: false
Expand Down
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
minikubeVersion = minikubeVersion === 'stable' ? 'latest' : minikubeVersion;
const installPath = (0, core_1.getInput)('install-path');
yield (0, download_1.downloadMinikube)(minikubeVersion, installPath);
yield (0, start_1.startMinikube)();
if ((0, core_1.getInput)('start').toLowerCase() === 'true') {
yield (0, start_1.startMinikube)();
}
}
catch (error) {
if (error instanceof Error) {
Expand Down
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ const run = async (): Promise<void> => {
minikubeVersion = minikubeVersion === 'stable' ? 'latest' : minikubeVersion
const installPath = getInput('install-path')
await downloadMinikube(minikubeVersion, installPath)
await startMinikube()
if (getInput('start').toLowerCase() === 'true') {
await startMinikube()
}
} catch (error) {
if (error instanceof Error) {
setFailed(error.message)
Expand Down

0 comments on commit 317d923

Please sign in to comment.