[ubuntu] Refactor functions for GitHub assets and hashes (#9040)

This commit is contained in:
Shamil Mubarakshin
2023-12-25 19:47:58 +01:00
committed by GitHub
parent 08d10be70d
commit 694536d87f
15 changed files with 149 additions and 114 deletions

View File

@@ -17,7 +17,7 @@ echo "Setting up ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE variable to ${ACTION_ARCHIV
setEtcEnvironmentVariable "ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE" "${ACTION_ARCHIVE_CACHE_DIR}"
# Download latest release from github.com/actions/action-versions and untar to /opt/actionarchivecache
downloadUrl=$(resolve_github_release_asset_url "actions/action-versions" "contains(\"action-versions.tar.gz\")" "latest")
downloadUrl=$(resolve_github_release_asset_url "actions/action-versions" "endswith(\"action-versions.tar.gz\")" "latest")
archive_path=$(download_with_retry "$downloadUrl")
tar -xzf "$archive_path" -C $ACTION_ARCHIVE_CACHE_DIR