Skip to content

Commit

Permalink
Fail if could not retrieve latest GH Runner version
Browse files Browse the repository at this point in the history
  • Loading branch information
ravwojdyla committed Jun 20, 2024
1 parent ef53ca8 commit 332c3b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ function start_vm {
latest_ver=$(curl -sL https://api.github.com/repos/actions/runner/releases/latest | jq -r '.tag_name' | sed -e 's/^v//')
runner_ver="$latest_ver"
echo "✅ runner_ver=latest is specified. v$latest_ver is detected as the latest version."
if [[ -z "$latest_ver" || "null" == "$latest_ver" ]]; then
echo "❌ could not retrieve the latest version of a runner"
exit 2
fi
fi
echo "✅ Startup script will install GitHub Actions v$runner_ver"
if $arm ; then
Expand Down

0 comments on commit 332c3b9

Please sign in to comment.