From a24ed5bc445492aa807e2af6e8f79e285ab44152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikolai=20R=C3=B8ed=20Kristiansen?= Date: Mon, 3 Mar 2025 12:27:52 +0100 Subject: [PATCH] Use uv instead of python venv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also roll default yamale version to 6.0.0 Signed-off-by: Nikolai Røed Kristiansen --- action.yml | 3 ++- ct.sh | 20 +++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/action.yml b/action.yml index d1ff45e..97f4ac3 100644 --- a/action.yml +++ b/action.yml @@ -14,13 +14,14 @@ inputs: required: false default: '1.33.0' yamale_version: - description: "The yamale version to install (default: 4.0.4)" + description: "The yamale version to install (default: 6.0.0)" required: false default: '6.0.0' runs: using: composite steps: - uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1 + - uses: astral-sh/setup-uv@eb1897b8dc4b5d5bfe39a428a8f2304605e0983c # v7.0.0 - run: | cd $GITHUB_ACTION_PATH \ && ./ct.sh \ diff --git a/ct.sh b/ct.sh index 797f945..93931e8 100755 --- a/ct.sh +++ b/ct.sh @@ -92,11 +92,11 @@ install_chart_testing() { mkdir -p "${cache_dir}" echo "Installing chart-testing v${version}..." - CT_CERT=https://github.com/helm/chart-testing/releases/download/v$version/chart-testing_${version#v}_linux_$arch.tar.gz.pem - CT_SIG=https://github.com/helm/chart-testing/releases/download/v$version/chart-testing_${version#v}_linux_$arch.tar.gz.sig + CT_CERT=https://github.com/helm/chart-testing/releases/download/v${version}/chart-testing_${version#v}_linux_${arch}.tar.gz.pem + CT_SIG=https://github.com/helm/chart-testing/releases/download/v${version}/chart-testing_${version#v}_linux_${arch}.tar.gz.sig - curl --retry 5 --retry-delay 1 -sSLo ct.tar.gz "https://github.com/helm/chart-testing/releases/download/v$version/chart-testing_${version#v}_linux_$arch.tar.gz" - cosign verify-blob --certificate $CT_CERT --signature $CT_SIG \ + curl --retry 5 --retry-delay 1 -sSLo ct.tar.gz "https://github.com/helm/chart-testing/releases/download/v${version}/chart-testing_${version#v}_linux_${arch}.tar.gz" + cosign verify-blob --certificate "${CT_CERT}" --signature "${CT_SIG}" \ --certificate-identity "https://github.com/helm/chart-testing/.github/workflows/release.yaml@refs/heads/main" \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" ct.tar.gz retVal=$? @@ -109,17 +109,15 @@ install_chart_testing() { rm -f ct.tar.gz echo 'Creating virtual Python environment...' - python3 -m venv "${venv_dir}" - - echo 'Activating virtual environment...' - # shellcheck disable=SC1090 - source "${venv_dir}/bin/activate" + export UV_LINK_MODE=copy + uv venv "${venv_dir}" + export VIRTUAL_ENV="${venv_dir}" echo 'Installing yamllint...' - pip3 install "yamllint==${yamllint_version}" + uv pip install "yamllint==${yamllint_version}" echo 'Installing Yamale...' - pip3 install "yamale==${yamale_version}" + uv pip install "yamale==${yamale_version}" fi # https://github.com/helm/chart-testing-action/issues/62