Skip to content

invalid value "nas1" for --exit-node; must be IP or unique node name #123

Open
@borecz

Description

I am trying to use tailscale/github-action@v2 Github action. You can find my Github action code below

name: tailscale test

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Tailscale
        uses: tailscale/github-action@v2
        with:
          authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
          args: --reset --accept-routes --exit-node nas1
          hostname: github-action-${{ github.run_id }}

However, when running above action, I am getting error invalid value "nas1" for --exit-node; must be IP or unique node name

image

I can successfully run Tailscale using nas1 as exit node when using Tailscale CLI

sudo tailscale up --authkey "${{ secrets.TAILSCALE_AUTHKEY }}" --hostname "github-action-${{ github.run_id }}"
sudo tailscale up --reset --accept-routes --exit-node "nas1" --hostname "github-action-${{ github.run_id }}"

Could you guide me on how to debug this issue, please?

Activity

seanmcne

seanmcne commented on May 31, 2024

@seanmcne

I ran into this as well, no matter what I do I cannot get the action to come up and assign an exit node so I broke it up into two different actions in the yaml file.

Would be interesting to know if this is by-design and if so, could it be documented?

    - name: Tailscale
      uses: tailscale/github-action@v2
      with:
        oauth-client-id: ${{ secrets.TS_OAUTH_CLIENTID }}
        oauth-secret: ${{ secrets.TS_OAUTH_KEY }}
        tags: tag:ci
        #args: "--exit-node=nas1" #using this we get an error: must be IP or unique node name
    - name: Tailscale - ReRun Up Command To Set ExitNode to pfsense
      uses: tailscale/github-action@v2
      with:
        oauth-client-id: ${{ secrets.TS_OAUTH_CLIENTID }}
        oauth-secret: ${{ secrets.TS_OAUTH_KEY  }}
        tags: tag:ci
        args: "--exit-node=nas1"
seanmcne

seanmcne commented on Jun 1, 2024

@seanmcne

FYI I found the reference issue explaining why this happens (again, I really think this needs to be documented somehow in the github action itself as it seems like anyone wanting to use this action would probably have to deal with the problem).

tailscale/tailscale#4152 (comment)

aquarhead

aquarhead commented on Aug 23, 2024

@aquarhead

FYI you can just run an additional tailscale set command:

- name: tailscale connect
      uses: tailscale/github-action@v2
      with:
        oauth-client-id: ...
        oauth-secret: ...
        tags: ...
    - name: use named exit node in tailscale
      run: |
        timeout 5m sudo -E tailscale set --exit-node=<name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @aquarhead@seanmcne@borecz

      Issue actions

        invalid value "nas1" for --exit-node; must be IP or unique node name · Issue #123 · tailscale/github-action