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

Add option to not start minikube cluster #421

Merged
merged 1 commit into from
Apr 9, 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
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
Loading