2022-08-08 09:50:37 -04:00
|
|
|
name: Install operator-sdk
|
|
|
|
description: |
|
|
|
|
Installs the operator-sdk binary.
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: "Version of the operator-sdk to install"
|
|
|
|
required: true
|
|
|
|
runs:
|
2022-09-14 09:14:26 -04:00
|
|
|
using: "composite"
|
2022-08-08 09:50:37 -04:00
|
|
|
steps:
|
2022-09-14 09:14:26 -04:00
|
|
|
- name: Install operator-sdk
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)
|
|
|
|
export OS=$(uname | awk '{print tolower($0)}')
|
|
|
|
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/${{ inputs.version }}
|
2023-01-19 05:22:31 -05:00
|
|
|
curl -fsSLO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
|
2022-09-14 09:14:26 -04:00
|
|
|
gpg --keyserver keyserver.ubuntu.com --recv-keys 052996E2A20B5C7E
|
2023-01-19 05:22:31 -05:00
|
|
|
curl -fsSLO ${OPERATOR_SDK_DL_URL}/checksums.txt
|
|
|
|
curl -fsSLO ${OPERATOR_SDK_DL_URL}/checksums.txt.asc
|
2022-09-14 09:14:26 -04:00
|
|
|
gpg -u "Operator SDK (release) <cncf-operator-sdk@cncf.io>" --verify checksums.txt.asc
|
2023-04-26 07:40:18 -04:00
|
|
|
grep operator-sdk_${OS}_${ARCH} checksums.txt | shasum -a 256 -c -
|
2022-09-14 09:14:26 -04:00
|
|
|
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk
|
|
|
|
rm checksums.txt checksums.txt.asc
|