Skip to content

Commit

Permalink
find latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxxstorm committed Jul 7, 2024
1 parent 0bf9b9f commit 432334f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ inputs:
version:
description: 'Tailscale version to use.'
required: true
default: '1.66.3'
default: 'latest'
sha256sum:
description: 'Expected SHA256 checksum of the tarball.'
required: false
Expand Down Expand Up @@ -62,6 +62,10 @@ runs:
VERSION: ${{ inputs.version }}
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)
echo "Latest Tailscale version: $VERSION"
fi
if [ ${{ runner.arch }} = "ARM64" ]; then
TS_ARCH="arm64"
elif [ ${{ runner.arch }} = "ARM" ]; then
Expand Down

0 comments on commit 432334f

Please sign in to comment.