Skip to content

Commit 5d4b391

Browse files
authored
feat: add support of arm64 arch runners in service creation script (actions#2606)
1 parent 85fdc9b commit 5d4b391

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/create-latest-svc.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -e
88
# Configures it as a service more secure
99
# Should be used on VMs and not containers
1010
# Works on OSX and Linux
11-
# Assumes x64 arch
11+
# Assumes x64 arch (support arm64)
1212
# See EXAMPLES below
1313

1414
flags_found=false
@@ -87,6 +87,9 @@ sudo echo
8787
runner_plat=linux
8888
[ ! -z "$(which sw_vers)" ] && runner_plat=osx;
8989

90+
runner_arch=x64
91+
[ ! -z "$(arch | grep arm64)" ] && runner_arch=arm64
92+
9093
function fatal()
9194
{
9295
echo "error: $1" >&2
@@ -139,7 +142,7 @@ echo "Downloading latest runner ..."
139142
# For the GHES Alpha, download the runner from github.com
140143
latest_version_label=$(curl -s -X GET 'https://api.github.com/repos/actions/runner/releases/latest' | jq -r '.tag_name')
141144
latest_version=$(echo ${latest_version_label:1})
142-
runner_file="actions-runner-${runner_plat}-x64-${latest_version}.tar.gz"
145+
runner_file="actions-runner-${runner_plat}-${runner_arch}-${latest_version}.tar.gz"
143146

144147
if [ -f "${runner_file}" ]; then
145148
echo "${runner_file} exists. skipping download."

0 commit comments

Comments
 (0)