From cb0029737d225a001316554e9b3836eda9ef8614 Mon Sep 17 00:00:00 2001 From: Lee Briggs Date: Thu, 12 Dec 2024 12:36:42 +0000 Subject: [PATCH] use json api for getting latest version --- README.md | 2 +- action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 646f1f6..057935a 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ with any of the Users on the tailnet, it has to Tag its nodes. Nodes created by this Action are [marked as Ephemeral](https://tailscale.com/s/ephemeral-nodes) to be automatically removed by the coordination server a short time after they finish their run. The nodes are also [marked Preapproved](https://tailscale.com/kb/1085/auth-keys/) -on Tailnets which use [Device Approval](https://tailscale.com/kb/1099/device-approval/) +on tailnets which use [Device Approval](https://tailscale.com/kb/1099/device-approval/) ## Defining Tailscale version diff --git a/action.yml b/action.yml index 1bfc41a..d5c25de 100644 --- a/action.yml +++ b/action.yml @@ -63,7 +63,7 @@ runs: SHA256SUM: ${{ inputs.sha256sum }} run: | if [ "$VERSION" = "latest" ]; then - VERSION=$(curl -s https://pkgs.tailscale.com/stable/ | grep -o 'value="[0-9.]*"' | sed 's/value="//;s/"//' | sort -V | tail -n 1) + VERSION=$(curl -s "https://pkgs.tailscale.com/stable/?mode=json" | jq -r .Version) echo "Latest Tailscale version: $VERSION" fi if [ ${{ runner.arch }} = "ARM64" ]; then