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

OPSEXP-1357 Add helm-install action #26

Merged
merged 3 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
32 changes: 32 additions & 0 deletions .github/actions/helm-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Helm cli install"
description: "Install the helm CLI"
inputs:
helm-version:
description: The helm version to install
default: "3.8.1"
required: true
linux-bin-path:
description: Where to put the helm binary
default: /usr/local/bin/
required: true
win-bin-path:
description: Where to put the helm binary
default: $HOME/bin/
required: true
runs:
using: "composite"
steps:
- name: Install helm cli
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to a dedicated script

curl -fsSLo helm.zip https://get.helm.sh/helm-v${{ inputs.helm-version }}-windows-amd64.zip
unzip -o helm.zip windows-amd64/helm.exe && rm helm.zip && mv windows-amd64/helm.exe "${{ inputs.win-bin-path }}" && rmdir windows-amd64
elif [ "$RUNNER_OS" == "Linux" ]; then
curl -fsSL https://get.helm.sh/helm-v${{ inputs.helm-version }}-$(uname | tr '[:upper:]' '[:lower:]')-amd64.tar.gz | tar xz --strip=1 -C "${{ inputs.linux-bin-path }}" $(uname | tr '[:upper:]' '[:lower:]')-amd64/helm
else
echo "$RUNNER_OS not supported"
exit 1
fi

echo helm $(helm version --client --short)
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/helm-install
- uses: ./.github/actions/setup-helm-docs
- uses: ./.github/actions/setup-jx-release-version
- uses: ./.github/actions/setup-rancher-cli
Expand Down