Files
runner-images/images/macos/scripts/build/install-actions-cache.sh
Vasilii Polikarpov 5f5ab19246 [Mac OS] Rewrite function download_with_retry (#8914)
* [Mac OS] Rewrite function download_with_retry

* Update powershell function DownloadWithRetry
2023-11-30 13:39:32 +01:00

21 lines
897 B
Bash

#!/bin/bash -e -o pipefail
################################################################################
## File: install-actions-cache.sh
## Desc: Download latest release from https://github.com/actions/action-versions
## Maintainer: #actions-runtime and @TingluoHuang
################################################################################
source ~/utils/utils.sh
echo "Check if ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE folder exist..."
if [ ! -d $ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE ]; then
mkdir -p $ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE
fi
download_url=$(get_github_package_download_url "actions/action-versions" "contains(\"action-versions.tar.gz\")" "latest")
echo "Downloading action-versions $download_url"
archive_path=$(download_with_retry "$download_url")
tar -xzf "$archive_path" -C "$ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE"
invoke_tests "ActionArchiveCache"