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

tailscale does not turn on if we are using "container" within the github workflow #96

Open
danield555 opened this issue Nov 1, 2023 · 3 comments

Comments

@danield555
Copy link

danield555 commented Nov 1, 2023

to reproduce, see the workflow example :

name: tailscale

on:
    push:
        branches:
            - main
    pull_request:
        branches:
            - '*'

jobs:
    build:
        runs-on: ubuntu-latest
        container: ubuntu:latest
        steps:
            - name: Check out code
              uses: actions/checkout@v4

            - name: install curl dependency
              run: apt-get update && apt-get install curl sudo -y

            - name: Tailscale Action
              uses: tailscale/github-action@v2
              with:
                oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
                oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
                tags: tag:ci

            - name: check for hello.ts.net in netmap
              run:
                tailscale status | grep -q hello
@DentonGentry
Copy link
Contributor

Running in userspace mode means that the other processes running in the Action would need to support SOCKS5 or HTTP proxies and set their ALL_PROXY or HTTP_PROXY to point to the localhost port where the tailscaled has been set to listen, like --socks5-server=localhost:1055 --outbound-http-proxy-listen=localhost:1055

https://tailscale.com/kb/1112/userspace-networking/

We focus on having the Action run in TUN mode because it makes all sockets-based applications in the GitHub runner work. Support for SOCKS5/HTTP_PROXY in apps isn't universal.

@danield555
Copy link
Author

as soon as I add the --tun=userspace-networking the tailscale works, but... I needed to add --exit-gateway="xx" to exit from a specific ip to a service, and the exit gateway is not taken into account when using networking mode ?

@markstos
Copy link

This relates to #113 about not working with curl being missing. That's another assumption that may not be true within a container, along with sudo possibly not being there either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants