Skip to content

Commit 0891dd6

Browse files
author
noboru kudoh
authored
Merge pull request #20 from mamezou-tech/add-option-install-only-plugins
Add option install Helm plugins
2 parents 883ddc4 + 868b962 commit 0891dd6

File tree

5 files changed

+67
-12
lines changed

5 files changed

+67
-12
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,67 @@ name: CI
33
on: [pull_request, workflow_dispatch]
44

55
jobs:
6-
install_all:
6+
install_all_default:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v1
9+
- uses: actions/checkout@v2
1010
- name: Setup helmfile
1111
uses: ./
1212
- name: Test
1313
run: |
1414
ls -l ~/bin
15+
helmfile --version
1516
kubectl version --client
1617
helm version
1718
helm plugin list
19+
20+
install_helmfile_with_version:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Setup helmfile
25+
uses: ./
26+
with:
27+
helmfile-version: "v0.135.0"
28+
- name: Test
29+
run: |
30+
ls -l ~/bin
1831
helmfile --version
32+
kubectl version --client
33+
helm version
34+
helm plugin list
35+
36+
install_helm_plugins_without_helm:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v2
40+
- name: Setup helmfile
41+
uses: ./
42+
with:
43+
install-kubectl: no
44+
install-helm: no
45+
- name: Test
46+
run: |
47+
ls -l ~/bin
48+
helmfile --version
49+
kubectl version --client
50+
helm version
51+
helm plugin list
1952
2053
install_only_helmfile:
2154
runs-on: ubuntu-latest
2255
steps:
23-
- uses: actions/checkout@v1
56+
- uses: actions/checkout@v2
2457
- name: Setup helmfile
2558
uses: ./
2659
with:
2760
install-kubectl: no
2861
install-helm: no
62+
install-helm-plugins: no
2963
- name: Test
3064
run: |
3165
ls -l ~/bin
3266
helmfile --version
3367
kubectl version --client
3468
helm version
69+
helm plugin list

README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v1
2222
- name: Setup helmfile
23-
uses: mamezou-tech/setup-helmfile@v0.5.0
23+
uses: mamezou-tech/setup-helmfile@v0.7.0
2424
- name: Test
2525
run: |
2626
helmfile --version
@@ -35,6 +35,7 @@ jobs:
3535
- `kubectl-release-date` : kubectl release date. Default `2020-08-04`
3636
- `install-kubectl` : Install kubectl. Default `yes`
3737
- `install-helm` : Install Helm. Default `yes`
38+
- `install-helm-plugins` : Install Helm plugins. Default `yes`
3839

3940
> See "[Installing kubectl - Amazon EKS](https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html)" for information how to specify the kubectl version.
4041

@@ -47,30 +48,41 @@ jobs:
4748
build:
4849
runs-on: ubuntu-latest
4950
steps:
50-
- uses: actions/checkout@v1
5151
- name: Setup helmfile
52-
uses: mamezou-tech/setup-helmfile@v0.5.0
52+
uses: mamezou-tech/setup-helmfile@v0.7.0
5353
with:
54-
helmfile-version: "v0.118.0"
54+
helmfile-version: "v0.135.0"
5555
```
5656

57-
If you want use default kubectl / Helm installed in GitHub Runner. you can specify inputs to not install them.
57+
If you are not particular about the version of kubectl / Helm and you can use the versions pre-installed on GitHub Actions runner, you can specify inputs not to install them.
58+
59+
> Notice: Helm plugins will be installed in this case.
5860

5961
```yaml
60-
name: CI
61-
on: [push]
6262
jobs:
6363
build:
6464
runs-on: ubuntu-latest
6565
steps:
66-
- uses: actions/checkout@v1
6766
- name: Setup helmfile
68-
uses: mamezou-tech/setup-helmfile@v0.6.0
67+
uses: mamezou-tech/setup-helmfile@v0.7.0
6968
with:
7069
install-kubectl: no
7170
install-helm: no
7271
```
7372

73+
If you don't want helm plugins installed, specify `no` for `install-helm-plugins`.
74+
75+
```yaml
76+
jobs:
77+
build:
78+
runs-on: ubuntu-latest
79+
steps:
80+
- name: Setup helmfile
81+
uses: mamezou-tech/setup-helmfile@v0.7.0
82+
with:
83+
install-helm-plugins: no
84+
```
85+
7486
### Build action (for maintainer)
7587
```
7688
$ npm install

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ inputs:
2929
description: "Install helm"
3030
default: "yes"
3131
required: false
32+
install-helm-plugins:
33+
description: "Install Helm plugins"
34+
default: "yes"
35+
required: false
3236
runs:
3337
using: "node12"
3438
main: "dist/index.js"

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4865,6 +4865,8 @@ async function run() {
48654865
}
48664866
if (core.getInput("install-helm") === "yes") {
48674867
installHelm(core.getInput("helm-version"));
4868+
}
4869+
if (core.getInput("install-helm-plugins") === "yes") {
48684870
installHelmPlugins();
48694871
}
48704872
installHelmfile(core.getInput("helmfile-version"));

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ async function run() {
88
}
99
if (core.getInput("install-helm") === "yes") {
1010
installHelm(core.getInput("helm-version"));
11+
}
12+
if (core.getInput("install-helm-plugins") === "yes") {
1113
installHelmPlugins();
1214
}
1315
installHelmfile(core.getInput("helmfile-version"));

0 commit comments

Comments
 (0)