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

hangs with expired authkey #50

Closed markmartirosian closed 1 year ago

markmartirosian commented 1 year ago

Tailscale actions hangs for hours if the authkey is expired. Most probably waiting for interactive cli auth flow.

reinismu commented 1 year ago

Noticed the same issue.

Also a bit sad that I have to go and manually change all auth keys for all of my projects every 90 days...

rihardsgrislis commented 1 year ago

All of my free GitHub Actions minutes are gone for this month, happened 4 times already. :D

Run tailscale/github-action@v1
Run MINOR=$(echo $VERSION | awk -F '.' {'print $2'})
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 94 22.3M   94 21.1M    0     0  18.7M      0  0:00:01  0:00:01 --:--:-- 18.6M
100 22.3M  100 22.3M    0     0  19.4M      0  0:00:01  0:00:01 --:--:-- 19.4M
Run sudo tailscaled 2>~/tailscaled.log &
backend error: invalid key: unable to validate API key
backend error: invalid key: unable to validate API key
backend error: invalid key: unable to validate API key
backend error: invalid key: unable to validate API key
backend error: invalid key: unable to validate API key

As others have said it goes on for 6 hours like this. I fixed it by setting a timeout for the Tailscale step:

- name: Connect Tailscale
  uses: tailscale/github-action@v1
  timeout-minutes: 1
  with:
    authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
    version: '1.40.0'
willnorris commented 1 year ago

added timeout in the action, but you can also specify one in your workflow config. The action also now supports OAuth clients, which don't need to be rotated every 90 days.