mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[ubuntu] Refactor functions for GitHub assets and hashes (#9040)
This commit is contained in:
committed by
GitHub
parent
08d10be70d
commit
694536d87f
@@ -8,11 +8,11 @@
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
KOTLIN_ROOT="/usr/share"
|
||||
download_url=$(resolve_github_release_asset_url "JetBrains/kotlin" "contains(\"kotlin-compiler\")" "latest")
|
||||
download_url=$(resolve_github_release_asset_url "JetBrains/kotlin" "contains(\"kotlin-compiler\") and endswith(\".zip\")" "latest")
|
||||
archive_path=$(download_with_retry "$download_url")
|
||||
|
||||
# Supply chain security - Kotlin
|
||||
kotlin_hash=$(get_github_package_hash "JetBrains" "kotlin" "kotlin-compiler-.*\.zip" "" "latest" "false" "|" 3)
|
||||
kotlin_hash=$(get_checksum_from_github_release "JetBrains/kotlin" "kotlin-compiler-.*\.zip" "latest" "SHA256")
|
||||
use_checksum_comparison "$archive_path" "$kotlin_hash"
|
||||
|
||||
unzip -qq "$archive_path" -d $KOTLIN_ROOT
|
||||
|
||||
Reference in New Issue
Block a user