mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 15:20:11 +00:00
[Ubuntu] add runner-package to curated images (#8474)
This commit is contained in:
18
images/linux/scripts/installers/runner-package.sh
Normal file
18
images/linux/scripts/installers/runner-package.sh
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
################################################################################
|
||||||
|
## File: runner-package.sh
|
||||||
|
## Desc: Downloads and Installs runner package
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Source the helpers for use with the script
|
||||||
|
source $HELPER_SCRIPTS/install.sh
|
||||||
|
|
||||||
|
DOWNLOAD_URL=$(get_github_package_download_url "actions/runner" 'test("actions-runner-linux-x64-[0-9]+\\.[0-9]{3}\\.[0-9]+\\.tar\\.gz")')
|
||||||
|
|
||||||
|
FILE_NAME="${DOWNLOAD_URL##*/}"
|
||||||
|
|
||||||
|
sudo mkdir -p /opt/runner-cache
|
||||||
|
|
||||||
|
download_with_retries "${DOWNLOAD_URL}" "/tmp" "${FILE_NAME}"
|
||||||
|
|
||||||
|
sudo mv /tmp/$FILE_NAME /opt/runner-cache/$FILE_NAME
|
||||||
7
images/linux/scripts/tests/RunnerCache.Tests.ps1
Normal file
7
images/linux/scripts/tests/RunnerCache.Tests.ps1
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Describe "RunnerCache" {
|
||||||
|
Context "runner cache directory not empty" {
|
||||||
|
It "/opt/runner-cache not empty" {
|
||||||
|
(Get-ChildItem -Path "/opt/runner-cache/*.tar.gz" -Recurse).Count | Should -BeGreaterThan 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -197,6 +197,7 @@
|
|||||||
"type": "shell",
|
"type": "shell",
|
||||||
"scripts": [
|
"scripts": [
|
||||||
"{{template_dir}}/scripts/installers/action-archive-cache.sh",
|
"{{template_dir}}/scripts/installers/action-archive-cache.sh",
|
||||||
|
"{{template_dir}}/scripts/installers/runner-package.sh",
|
||||||
"{{template_dir}}/scripts/installers/apt-common.sh",
|
"{{template_dir}}/scripts/installers/apt-common.sh",
|
||||||
"{{template_dir}}/scripts/installers/azcopy.sh",
|
"{{template_dir}}/scripts/installers/azcopy.sh",
|
||||||
"{{template_dir}}/scripts/installers/azure-cli.sh",
|
"{{template_dir}}/scripts/installers/azure-cli.sh",
|
||||||
@@ -258,8 +259,7 @@
|
|||||||
"{{template_dir}}/scripts/installers/android.sh",
|
"{{template_dir}}/scripts/installers/android.sh",
|
||||||
"{{template_dir}}/scripts/installers/pypy.sh",
|
"{{template_dir}}/scripts/installers/pypy.sh",
|
||||||
"{{template_dir}}/scripts/installers/python.sh",
|
"{{template_dir}}/scripts/installers/python.sh",
|
||||||
"{{template_dir}}/scripts/installers/zstd.sh"
|
"{{template_dir}}/scripts/installers/zstd.sh" ],
|
||||||
],
|
|
||||||
"environment_vars": [
|
"environment_vars": [
|
||||||
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
|
||||||
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
|
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}",
|
||||||
|
|||||||
@@ -281,6 +281,7 @@ build {
|
|||||||
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
scripts = [
|
scripts = [
|
||||||
"${path.root}/scripts/installers/action-archive-cache.sh",
|
"${path.root}/scripts/installers/action-archive-cache.sh",
|
||||||
|
"${path.root}/scripts/installers/runner-package.sh",
|
||||||
"${path.root}/scripts/installers/apt-common.sh",
|
"${path.root}/scripts/installers/apt-common.sh",
|
||||||
"${path.root}/scripts/installers/azcopy.sh",
|
"${path.root}/scripts/installers/azcopy.sh",
|
||||||
"${path.root}/scripts/installers/azure-cli.sh",
|
"${path.root}/scripts/installers/azure-cli.sh",
|
||||||
|
|||||||
Reference in New Issue
Block a user