tailscale / github-action

A GitHub Action to connect your workflow to your Tailscale network.
BSD 3-Clause "New" or "Revised" License
532 stars 80 forks source link

Add support for Tailscale SSH #45

Closed sebdanielsson closed 1 year ago

sebdanielsson commented 1 year ago

I would love to using Tailscale SSH with this action. Would remove the need for a couple of environment variables.

DentonGentry commented 1 year ago

The workflow supports an args parameter of arguments to pass to tailscale up, which could be:

  - name: Tailscale
    uses: tailscale/github-action@v1
    with:
      authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
      args: --ssh
sebdanielsson commented 1 year ago

Oh! I was looking for something like that but clearly I didn't look close enough. Thank you😃

sebdanielsson commented 1 year ago

Hmm weird. Just tested running with args and got the following error: Warning: Unexpected input(s) 'args', valid inputs are ['authkey', 'version']

Here's my step:

- name: 'Tailscale'
        id: tailscale
        uses: tailscale/github-action@v1
        with:
          version: latest
          authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
          args: --ssh
DentonGentry commented 1 year ago

If you are pulling in tailscale/github-action@v1, that is a version from some time ago and pre-dates the args support. You might pull in tailscale/github-action@e870a1112fcc1faeeeeea3c1b0ce544e5ad01844 instead, the current HEAD, or leave it unspecified if you always want whatever is current.

sebdanielsson commented 1 year ago

That did the trick. Thanks!