Merge pull request #131 from jaxxstorm/latest_version

Always pull latest version
This commit is contained in:
Lee Briggs 2024-12-12 22:33:39 -08:00 committed by GitHub
commit 1ec4a5d914
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View file

@ -63,5 +63,17 @@ Which Tailscale version to use can be set like this:
version: 1.52.0
```
If you'd like to specify the latest version, simply set the version as `latest`
```yaml
- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
version: latest
```
You can find the latest Tailscale stable version number at
https://pkgs.tailscale.com/stable/#static.

View file

@ -21,7 +21,7 @@ inputs:
description: 'Comma separated list of Tags to be applied to nodes. The OAuth client must have permission to apply these tags.'
required: false
version:
description: 'Tailscale version to use.'
description: 'Tailscale version to use. Specify `latest` to use the latest stable version.'
required: true
default: '1.72.1'
sha256sum:
@ -70,6 +70,10 @@ runs:
VERSION: ${{ inputs.version }}
SHA256SUM: ${{ inputs.sha256sum }}
run: |
if [ "$VERSION" = "latest" ]; then
VERSION=$(curl -s "https://pkgs.tailscale.com/stable/?mode=json" | jq -r .Version)
echo "Latest Tailscale version: $VERSION"
fi
if [ ${{ runner.arch }} = "ARM64" ]; then
TS_ARCH="arm64"
elif [ ${{ runner.arch }} = "ARM" ]; then