mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 03:27:05 +00:00
[Ubuntu] Install sbt from gh releases (#2983)
* Change sbt installation method to gh releases * add source install.sh
This commit is contained in:
@@ -4,11 +4,12 @@
|
||||
## Desc: Installs sbt
|
||||
################################################################################
|
||||
|
||||
# Install sbt
|
||||
# https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html
|
||||
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
|
||||
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add
|
||||
apt-get -q update
|
||||
apt-get -y install sbt
|
||||
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"
|
||||
tar zxf /tmp/sbt.tgz -C /usr/share
|
||||
ln -s /usr/share/sbt/bin/sbt /usr/bin/sbt
|
||||
|
||||
invoke_tests "Tools" "Sbt"
|
||||
Reference in New Issue
Block a user