From 2b1979b43c3078d6ede593e6ab0c22583aeca99c Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Mon, 16 Jun 2025 09:34:30 +0200 Subject: [PATCH] fix(ci): replace OS and ARCH The following patch replaces ${OS} and ${ARCH} with a static value `linux` and the command `dpkg --print-architecture`. --- .gitea/workflows/release-version.yml | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/release-version.yml b/.gitea/workflows/release-version.yml index 0018b3c..76d1fef 100644 --- a/.gitea/workflows/release-version.yml +++ b/.gitea/workflows/release-version.yml @@ -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.18.2" 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