Skip to content

Commit

Permalink
chore(ci): add tailscale status check to deploy-k8s.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian authored Feb 27, 2025
1 parent c115212 commit 9479527
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/deploy-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,24 @@ jobs:
TS_OAUTH_CLIENT_ID: ${{ vars.OP_TS_OAUTH_CLIENT_ID_URI }}
TS_OAUTH_SECRET: ${{ vars.OP_TS_OAUTH_CLIENT_SECRET_URI }}

- name: Install jq
uses: dcarbone/[email protected]
- name: Tailscale
uses: tailscale/github-action@v3
with:
oauth-client-id: ${{ env.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ env.TS_OAUTH_SECRET }}
auth-key: ${{ env.TS_AUTHKEY }}
- name: Check tailscale connection
run: |
tlrunning=$(tailscale status --json | jq -r '.BackendState')
if [[ $tlrunning != "Running" ]]; then
exit 1
fi

tlstatus=$(tailscale status --json | jq -r '.CurrentTailnet.Name')

if [[ $tlstatus != "${{ env.$TAILSCALE_ORG }}" ]]; then
exit 1
fi
- name: Set up Helm
uses: azure/[email protected]
with:
Expand Down

0 comments on commit 9479527

Please sign in to comment.