Skip to content

Commit

Permalink
Merge pull request #131 from jaxxstorm/latest_version
Browse files Browse the repository at this point in the history
Always pull latest version
  • Loading branch information
jaxxstorm authored Dec 13, 2024
2 parents 67573e6 + cb00297 commit 1ec4a5d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1ec4a5d

Please sign in to comment.