Skip to content

Commit

Permalink
Make GITHUB_URL overridable
Browse files Browse the repository at this point in the history
Signed-off-by: Reinhard Nägele <[email protected]>
  • Loading branch information
unguiculus authored and brandond committed Jan 30, 2025
1 parent 6100f5c commit a0cfc66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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')
}

Expand Down
2 changes: 1 addition & 1 deletion install.sh.sha256sum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
73ca045f12174c87138d59dd14b23b8ab70d96c9eaead63104109d330daa8a6a install.sh
b0715fb49a4a1d32241ac23c222a1d343baa1f2846f25032b306d1b30dbacd15 install.sh

0 comments on commit a0cfc66

Please sign in to comment.