fix(ci): replace OS and ARCH
The following patch replaces ${OS} and ${ARCH} with a static value `linux` and the command `dpkg --print-architecture`.
This commit is contained in:
parent
4eed5ca3df
commit
da0eda0ffc
@ -13,18 +13,6 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Determine Architecture and Operating System to support x86_64 and ARM based CI nodes
|
||||
run: |
|
||||
# determine operating system
|
||||
OS=$(uname | tr '[:upper:]' '[:lower:]')
|
||||
echo "OS=${OS}" >> $GITHUB_ENV
|
||||
echo "INFO: Set environment variable OS=${OS}"
|
||||
|
||||
# determine architecture
|
||||
ARCH="$(dpkg --print-architecture)"
|
||||
echo "ARCH=${ARCH}" >> $GITHUB_ENV
|
||||
echo "INFO: Set environment variable ARCH=${ARCH}"
|
||||
|
||||
- name: Install packages via apt
|
||||
run: |
|
||||
apt update --yes
|
||||
@ -35,18 +23,18 @@ jobs:
|
||||
# renovate: datasource=docker depName=alpine/helm
|
||||
HELM_VERSION: "3.17.3"
|
||||
run: |
|
||||
curl --fail --location --output /dev/stdout --silent --show-error https://get.helm.sh/helm-v${HELM_VERSION}-${OS}-${ARCH}.tar.gz | tar --extract --gzip --file /dev/stdin
|
||||
mv ${OS}-${ARCH}/helm /usr/local/bin/
|
||||
rm --force --recursive ${OS}-${ARCH} helm-v${HELM_VERSION}-${OS}-${ARCH}.tar.gz
|
||||
curl --fail --location --output /dev/stdout --silent --show-error https://get.helm.sh/helm-v${HELM_VERSION}-linux-$(dpkg --print-architecture).tar.gz | tar --extract --gzip --file /dev/stdin
|
||||
mv linux-$(dpkg --print-architecture)/helm /usr/local/bin/
|
||||
rm --force --recursive linux-$(dpkg --print-architecture) helm-v${HELM_VERSION}-linux-$(dpkg --print-architecture).tar.gz
|
||||
helm version
|
||||
|
||||
- name: Install yq
|
||||
env:
|
||||
YQ_VERSION: v4.45.4 # renovate: datasource=github-releases depName=mikefarah/yq
|
||||
run: |
|
||||
curl --fail --location --output /dev/stdout --silent --show-error https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_${OS}_${ARCH}.tar.gz | tar --extract --gzip --file /dev/stdin
|
||||
mv yq_${OS}_${ARCH} /usr/local/bin
|
||||
rm --force --recursive yq_${OS}_${ARCH} yq_${OS}_${ARCH}.tar.gz
|
||||
curl --fail --location --output /dev/stdout --silent --show-error https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_$(dpkg --print-architecture).tar.gz | tar --extract --gzip --file /dev/stdin
|
||||
mv yq_linux_$(dpkg --print-architecture) /usr/local/bin
|
||||
rm --force --recursive yq_linux_$(dpkg --print-architecture) yq_linux_$(dpkg --print-architecture).tar.gz
|
||||
yq --version
|
||||
|
||||
- name: Install docker-ce via apt
|
||||
@ -54,7 +42,7 @@ jobs:
|
||||
install -m 0755 -d /etc/apt/keyrings
|
||||
curl --fail --location --silent --show-error https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
chmod a+r /etc/apt/keyrings/docker.gpg
|
||||
echo "deb [arch="${ARCH}" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
apt update --yes
|
||||
apt install --yes python3 python3-pip apt-transport-https docker-ce-cli
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user