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

Does not work on cross platform build #61

Open andrejohansson opened 1 year ago

andrejohansson commented 1 year ago

I might be missing something, but for me this does not work on either linux, windows or macos (see #56) builds.

I'm trying to cross compile a tauri app using the script published here but all platforms fail on this action.

Since I fail on all platforms...am I missing something here? I´ve put up an epheremal key in tailscale admin console and added it to secrets.

Action definition

jobs:
  publish-tauri:
    permissions:
      contents: write
    strategy:
      fail-fast: false
      matrix:
        platform: [macos-latest, ubuntu-20.04, windows-latest]

    runs-on: ${{ matrix.platform }}
    steps:
      # Connect to our vpn in order to deliver artifacts
      - name: Tailscale
        uses: tailscale/github-action@v1
        with:
          authkey: ${{ secrets.TAILSCALE_AUTHKEY }}

macos failure

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
100 14.2M  100 14.2M    0     0  45.7M      0 --:--:-- --:--:-- --:--:-- 46.2M
mv: fastcopy: open() failed (to): /usr/bin/tailscale: Operation not permitted
mv: fastcopy: open() failed (to): /usr/bin/tailscaled: Operation not permitted
Error: Process completed with exit code 1.

windows failure

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
 12 14.2M   12 1888k    0     0  2659k      0  0:00:05 --:--:--  0:00:05 2662k
100 14.2M  100 14.2M    0     0  14.2M      0  0:00:01  0:00:01 --:--:-- 14.2M
D:\a\_temp\de03d6bb-0580-475e-b0c2-e60dc28bf808.sh: line 11: sudo: command not found
Error: Process completed with exit code 127.

linux failure

The tricky part with linux is that it´s reporting success but it´s actually failing.

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
100 14.2M  100 14.2M    0     0   154M      0 --:--:-- --:--:-- --:--:--  154M
Run sudo tailscaled 2>~/tailscaled.log &
failed to connect to local tailscaled (which appears to be running). Got error: Get "http://local-tailscaled.sock/localapi/v0/status": dial unix /var/run/tailscale/tailscaled.sock: connect: no such file or directory
Success.
andrewgbell commented 1 year ago

Are there any plans for this to work on windows?

bradfitz commented 1 year ago

It should work fine on Linux.

macOS and Windows should be possible but we haven't done the work yet.

andrewgbell commented 1 year ago

Windows would be handy since the hosted runners don't allow linux containers, so the idea would be to connect to a linux runner to use the container there...

DentonGentry commented 9 months ago

Copying from https://github.com/tailscale/github-action/issues/93

If using private Windows CI runners, Tailscale could be installed on the underlying machine instead of being part of the Action.

We cannot easily add support for Windows runners supplied by GitHub because installation requires Administrator rights. We'd have to run the Windows Tailscale in userspace-networking mode, which means it would require all of the other binaries in the Action to support SOCKS5 or HTTP Proxies. https://tailscale.com/kb/1112/userspace-networking/