This GitHub Action connects to your Tailscale network by adding a step to your workflow.
↓ Use this action before you need access to your Tailnet in your workflow ↓
- name: Run Tailscale
uses: m-bers/tailscale-action@v2
with:
apikey: ${{ secrets.TAILSCALE_APIKEY }}
tailnet: ${{ secrets.TAILSCALE_TAILNET }}
# optional, overrides auto ephemeral authkey generation
# authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
Subsequent steps in the Action can then access nodes in your Tailnet.
↓ Use this action at the end of your workflow to remove the ephemeral node from your Tailnet ↓
- name: Remove Tailscale
if: always()
uses: m-bers/tailscale-action@v2
with:
action: down
apikey: ${{ secrets.TAILSCALE_APIKEY }}
TAILSCALE_APIKEY is an apikey for automatic ephemeral authkey generation. These tend to be a good fit for GitHub runners, as they clean up their state automatically shortly after the runner finishes.
TAILSCALE_TAILNET is the name of the tailnet the runner will join if using automatic ephemeral auth. By default it is set to the tailnet that corresponds to your GitHub account.
TAILSCALE_AUTHKEY is an authkey for the Tailnet to be accessed, and needs to be populated in the Secrets for your workflow if not using automatic ephemeral auth.
This repository is NOT provided and maintained by or otherwise affiliated with Tailscale. It also uses an API key that are very powerful and can be used to make arbitrary changes to machines in your tailnet if an unauthorized user gets a hold of the apikey. Use at your own risk.