diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a273ff5..f8dc71a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,32 +3,67 @@ name: CI on: [pull_request, workflow_dispatch] jobs: - install_all: + install_all_default: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Setup helmfile uses: ./ - name: Test run: | ls -l ~/bin + helmfile --version kubectl version --client helm version helm plugin list + + install_helmfile_with_version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup helmfile + uses: ./ + with: + helmfile-version: "v0.135.0" + - name: Test + run: | + ls -l ~/bin helmfile --version + kubectl version --client + helm version + helm plugin list + + install_helm_plugins_without_helm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup helmfile + uses: ./ + with: + install-kubectl: no + install-helm: no + - name: Test + run: | + ls -l ~/bin + helmfile --version + kubectl version --client + helm version + helm plugin list install_only_helmfile: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Setup helmfile uses: ./ with: install-kubectl: no install-helm: no + install-helm-plugins: no - name: Test run: | ls -l ~/bin helmfile --version kubectl version --client helm version + helm plugin list diff --git a/README.md b/README.md index 6fd9dc4..02adaa2 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Setup helmfile - uses: mamezou-tech/setup-helmfile@v0.5.0 + uses: mamezou-tech/setup-helmfile@v0.7.0 - name: Test run: | helmfile --version @@ -35,6 +35,7 @@ jobs: - `kubectl-release-date` : kubectl release date. Default `2020-08-04` - `install-kubectl` : Install kubectl. Default `yes` - `install-helm` : Install Helm. Default `yes` +- `install-helm-plugins` : Install Helm plugins. Default `yes` > See "[Installing kubectl - Amazon EKS](https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html)" for information how to specify the kubectl version. @@ -47,30 +48,41 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - name: Setup helmfile - uses: mamezou-tech/setup-helmfile@v0.5.0 + uses: mamezou-tech/setup-helmfile@v0.7.0 with: - helmfile-version: "v0.118.0" + helmfile-version: "v0.135.0" ``` -If you want use default kubectl / Helm installed in GitHub Runner. you can specify inputs to not install them. +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. + +> Notice: Helm plugins will be installed in this case. ```yaml -name: CI -on: [push] jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - name: Setup helmfile - uses: mamezou-tech/setup-helmfile@v0.6.0 + uses: mamezou-tech/setup-helmfile@v0.7.0 with: install-kubectl: no install-helm: no ``` +If you don't want helm plugins installed, specify `no` for `install-helm-plugins`. + +```yaml +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Setup helmfile + uses: mamezou-tech/setup-helmfile@v0.7.0 + with: + install-helm-plugins: no +``` + ### Build action (for maintainer) ``` $ npm install diff --git a/action.yml b/action.yml index d11225a..499f5fe 100644 --- a/action.yml +++ b/action.yml @@ -29,6 +29,10 @@ inputs: description: "Install helm" default: "yes" required: false + install-helm-plugins: + description: "Install Helm plugins" + default: "yes" + required: false runs: using: "node12" main: "dist/index.js" diff --git a/dist/index.js b/dist/index.js index 0ffb367..a94f286 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4865,6 +4865,8 @@ async function run() { } if (core.getInput("install-helm") === "yes") { installHelm(core.getInput("helm-version")); + } + if (core.getInput("install-helm-plugins") === "yes") { installHelmPlugins(); } installHelmfile(core.getInput("helmfile-version")); diff --git a/src/index.js b/src/index.js index ff71c66..0921c86 100644 --- a/src/index.js +++ b/src/index.js @@ -8,6 +8,8 @@ async function run() { } if (core.getInput("install-helm") === "yes") { installHelm(core.getInput("helm-version")); + } + if (core.getInput("install-helm-plugins") === "yes") { installHelmPlugins(); } installHelmfile(core.getInput("helmfile-version"));