From e0c37582b0f279c5ad86f5daa844ea4e5bab8a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20N=C3=A4gele?= Date: Thu, 30 Jan 2025 10:49:09 +0100 Subject: [PATCH] Make GITHUB_URL overridable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Reinhard Nägele --- install.sh | 6 +++--- install.sh.sha256sum | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 438ec661e404..268c24a2b7dd 100755 --- a/install.sh +++ b/install.sh @@ -95,7 +95,7 @@ set -o noglob # Channel to use for fetching k3s download URL. # Defaults to 'stable'. -GITHUB_URL=https://github.com/k3s-io/k3s/releases +GITHUB_URL=${GITHUB_URL:-https://github.com/k3s-io/k3s/releases} GITHUB_PR_URL="" STORAGE_URL=https://k3s-ci-builds.s3.amazonaws.com DOWNLOADER= @@ -513,8 +513,8 @@ get_pr_artifact_url() { # GET request to the GitHub API to retrieve the Build workflow associated with the commit run_id=$(curl -s -H "Authorization: Bearer ${GITHUB_TOKEN}" "${github_api_url}/commits/${commit_id}/check-runs?check_name=build%20%2F%20Build" | jq -r '[.check_runs | sort_by(.id) | .[].details_url | split("/")[7]] | last') - - # Extract the artifact ID for the "k3s" artifact + + # Extract the artifact ID for the "k3s" artifact GITHUB_PR_URL=$(curl -s -H "Authorization: Bearer ${GITHUB_TOKEN}" "${github_api_url}/actions/runs/${run_id}/artifacts" | jq -r '.artifacts[] | select(.name == "k3s") | .archive_download_url') } diff --git a/install.sh.sha256sum b/install.sh.sha256sum index 27dbba21e9fe..aac579547547 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -73ca045f12174c87138d59dd14b23b8ab70d96c9eaead63104109d330daa8a6a install.sh +b0715fb49a4a1d32241ac23c222a1d343baa1f2846f25032b306d1b30dbacd15 install.sh