mirror of
https://github.com/cirruslabs/macos-image-templates.git
synced 2026-10-20 17:23:46 +02:00
Always install the latest GitHub Actions Runner (#117)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set shell options to enable fail-fast behavior
|
||||
#
|
||||
# * -e: fail the script when an error occurs or command fails
|
||||
# * -u: fail the script when attempting to reference unset parameters
|
||||
# * -o pipefail: by default an exit status of a pipeline is that of its
|
||||
# last command, this fails the pipe early if an error in
|
||||
# any of its commands occurs
|
||||
#
|
||||
set -euo pipefail
|
||||
|
||||
source ~/.zprofile
|
||||
brew install jq
|
||||
|
||||
DOWNLOAD_URL=$(curl -sS 'https://api.github.com/repos/actions/runner/releases/latest' | jq --raw-output '.assets[] | select(.name | test("actions-runner-osx-arm64-[0-9.]+.tar.gz")) | .browser_download_url')
|
||||
|
||||
rm -rf actions-runner && mkdir actions-runner && cd actions-runner
|
||||
|
||||
wget -O - "${DOWNLOAD_URL}" | tar xz
|
||||
Reference in New Issue
Block a user