Update to use v4 of the Tailscale GitHub Action #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test tshello with Tailscale | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.23' | |
| - name: Connect to Tailscale | |
| uses: tailscale/github-action@v4 | |
| with: | |
| oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }} | |
| oauth-secret: ${{ secrets.TS_OAUTH_SECRET }} | |
| tags: tag:ci | |
| version: latest | |
| - name: Build tshello | |
| run: | | |
| cd tshello | |
| go mod download | |
| go build -v ./... | |
| - name: Run tests | |
| run: | | |
| cd tshello | |
| go test -v -timeout 30s ./... | |
| - name: Test connectivity | |
| run: | | |
| # Test that we can reach the Tailscale network | |
| tailscale status | |
| # Show our IP address | |
| tailscale ip -4 |