Skip to content

Commit 71c8c7a

Browse files
feat(setup-k8s-tools): Add Helm signature verification toggle (#87)
* feat(setup-k8s-tools): Add Helm signature verification toggle * chore: Apply suggestions Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com> --------- Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com>
1 parent bdccb71 commit 71c8c7a

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.scripts/actions/install_helm.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ PLATFORM=$("$GITHUB_ACTION_PATH/../.scripts/actions/get_platform.sh")
77
ARCH=$("$GITHUB_ACTION_PATH/../.scripts/actions/get_architecture.sh")
88

99
FILENAME="helm-${HELM_VERSION}-${PLATFORM}-${ARCH}.tar.gz"
10+
VERIFY_SIGNATURE="${VERIFY_SIGNATURE:-true}"
1011

1112
echo "::group::Install helm"
1213
mkdir /tmp/helm
1314
curl -fsSL -o /tmp/helm/helm.tar.gz "https://get.helm.sh/${FILENAME}"
14-
curl -fsSL -o /tmp/helm/helm.tar.gz.asc "https://github.com/helm/helm/releases/download/${HELM_VERSION}/${FILENAME}.asc"
1515

16-
curl https://keybase.io/mattfarina/pgp_keys.asc | gpg --import
17-
gpg --verify /tmp/helm/helm.tar.gz.asc /tmp/helm/helm.tar.gz
16+
if [[ "$VERIFY_SIGNATURE" == "true" ]]; then
17+
curl -fsSL -o /tmp/helm/helm.tar.gz.asc "https://github.com/helm/helm/releases/download/${HELM_VERSION}/${FILENAME}.asc"
18+
curl https://keybase.io/mattfarina/pgp_keys.asc | gpg --import
19+
gpg --verify /tmp/helm/helm.tar.gz.asc /tmp/helm/helm.tar.gz
20+
fi
1821

1922
tar --directory="/tmp/helm" --strip-components=1 -zxvf /tmp/helm/helm.tar.gz "${PLATFORM}-${ARCH}"
2023
# Overwrite the existing binary

setup-k8s-tools/action.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,7 @@ runs:
3535
env:
3636
HELM_VERSION: ${{ inputs.helm-version }}
3737
GITHUB_DEBUG: ${{ runner.debug }}
38+
# The signature is expired since a couple of years...
39+
VERIFY_SIGNATURE: "false"
3840
shell: bash
3941
run: "$GITHUB_ACTION_PATH/../.scripts/actions/install_helm.sh"

0 commit comments

Comments
 (0)