Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use pre-installed binaries #121

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ inputs:
tags:
description: 'Comma separated list of Tags to be applied to nodes. The OAuth client must have permission to apply these tags.'
required: false
download:
description: 'Whether to download the `tailscale` and `tailscaled` binaries.'
required: false
default: 'true'
version:
description: 'Tailscale version to use.'
description: 'Tailscale version to use if downloading.'
required: true
default: '1.66.3'
sha256sum:
description: 'Expected SHA256 checksum of the tarball.'
description: 'Expected SHA256 checksum of the tarball when downloading.'
required: false
default: ''
args:
Expand Down Expand Up @@ -57,7 +61,7 @@ runs:
exit 1
- name: Download Tailscale
shell: bash
id: download
if: ${{ inputs.download == 'true' }}
env:
VERSION: ${{ inputs.version }}
SHA256SUM: ${{ inputs.sha256sum }}
Expand Down Expand Up @@ -91,6 +95,18 @@ runs:
rm tailscale.tgz
TSPATH=/tmp/tailscale_${VERSION}_${TS_ARCH}
sudo mv "${TSPATH}/tailscale" "${TSPATH}/tailscaled" /usr/bin
- name: Link Tailscale binaries
shell: bash
if: ${{ inputs.download == 'false' }}
run: |
TAILSCALE_PATH=$(which tailscale)
TAILSCALED_PATH=$(which tailscaled)
if [[ ! -f /usr/bin/tailscale ]]; then
sudo -E ln -s -f ${TAILSCALE_PATH} /usr/bin/tailscale
fi
if [[ ! -f /usr/bin/tailscaled ]]; then
sudo -E ln -s -f ${TAILSCALED_PATH} /usr/bin/tailscaled
fi
- name: Start Tailscale Daemon
shell: bash
env:
Expand Down