mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 23:28:57 +00:00
[Ubuntu] Implement helper to get GitHub package download URL (#4947)
This commit is contained in:
committed by
GitHub
parent
cb8931646f
commit
404da76e17
@@ -7,8 +7,8 @@
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Install latest sbt release
|
||||
sbtVersion=$(curl -s -L "https://api.github.com/repos/sbt/sbt/releases" | jq -r '.[] | select(.prerelease==false).name' | sort --unique --version-sort | grep -ve "-.*" | tail -1)
|
||||
download_with_retries "https://github.com/sbt/sbt/releases/download/v${sbtVersion}/sbt-${sbtVersion}.tgz" "/tmp" "sbt.tgz"
|
||||
downloadUrl=$(get_github_package_download_url "sbt/sbt" "endswith(\".tgz\")")
|
||||
download_with_retries "$downloadUrl" "/tmp" "sbt.tgz"
|
||||
tar zxf /tmp/sbt.tgz -C /usr/share
|
||||
ln -s /usr/share/sbt/bin/sbt /usr/bin/sbt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user