E2E: Download external binaries depending on host OS & arch

This commit is contained in:
Nils Hanke 2022-09-14 16:30:13 +02:00 committed by Nils Hanke
parent a1fd971c3c
commit 6df92c127c
3 changed files with 13 additions and 7 deletions

View File

@ -48,7 +48,7 @@ runs:
else
cmake ..
fi
GOOS=${{ inputs.targetOS }} GOARCH=${{ inputs.targetArch }} make -j`nproc` cli
GOOS=${{ inputs.targetOS }} GOARCH=${{ inputs.targetArch }} make cli
cp constellation constellation-${{ inputs.targetOS }}-${{ inputs.targetArch }}
echo "$(pwd)" >> $GITHUB_PATH
export PATH="$PATH:$(pwd)"
@ -63,9 +63,11 @@ runs:
- name: Install Rekor
run: |
curl -sLO https://github.com/sigstore/rekor/releases/download/v0.12.0/rekor-cli-linux-amd64
sudo install rekor-cli-linux-amd64 /usr/local/bin/rekor-cli
rm rekor-cli-linux-amd64
HOSTOS="$(go env GOOS)"
HOSTARCH="$(go env GOARCH)"
curl -sLO https://github.com/sigstore/rekor/releases/download/v0.12.0/rekor-cli-${HOSTOS}-${HOSTARCH}
sudo install rekor-cli-${HOSTOS}-${HOSTARCH} /usr/local/bin/rekor-cli
rm rekor-cli-${HOSTOS}-${HOSTARCH}
shell: bash
working-directory: build
if: ${{ inputs.cosignPublicKey != '' && inputs.cosignPrivateKey != '' && inputs.cosignPassword != '' }}

View File

@ -40,7 +40,9 @@ runs:
steps:
- name: Install kubectl
run: |
curl -sLO https://dl.k8s.io/release/v1.23.0/bin/linux/amd64/kubectl
HOSTOS="$(go env GOOS)"
HOSTARCH="$(go env GOARCH)"
curl -sLO https://dl.k8s.io/release/v1.23.0/bin/{$HOSTOS}/{$HOSTARCH}/kubectl
install kubectl /usr/local/bin
shell: bash

View File

@ -13,8 +13,10 @@ runs:
steps:
- name: Install sonobuoy
run: |
curl -sLO https://github.com/vmware-tanzu/sonobuoy/releases/download/v${{ inputs.sonobuoyVersion }}/sonobuoy_${{ inputs.sonobuoyVersion }}_linux_amd64.tar.gz
tar -xzf sonobuoy_${{ inputs.sonobuoyVersion }}_linux_amd64.tar.gz
HOSTOS="$(go env GOOS)"
HOSTARCH="$(go env GOARCH)"
curl -sLO https://github.com/vmware-tanzu/sonobuoy/releases/download/v${{ inputs.sonobuoyVersion }}/sonobuoy_${{ inputs.sonobuoyVersion }}_${HOSTOS}_${HOSTARCH}.tar.gz
tar -xzf sonobuoy_${{ inputs.sonobuoyVersion }}_${HOSTOS}_${HOSTARCH}.tar.gz
install sonobuoy /usr/local/bin
shell: bash
- name: Sonobuoy version