Check connection to flashhost #350
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: "Check connection to flashhost" | |
| # Needed secrets: | |
| # - DEPLOY_KEY: private ssh key to access fab@flashhost.lan | |
| # - DEPLOY_KNOWN_HOSTS: known hosts including fab@flashhost.lan | |
| # - TAILSCALE_OAUTH_CLIENT, TAILSCALE_OAUTH_SECRET: OAuth credentials for tailscale | |
| on: | |
| schedule: | |
| - cron: "7 4 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| check-tailscale: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "🧥 Cloak some stuff" | |
| env: | |
| TESTRIG_EXTERNAL: ${{ secrets.TESTRIG_EXTERNAL }} | |
| run: | | |
| echo "::add-mask::$TESTRIG_EXTERNAL" | |
| - name: "🔑 Install SSH key in agent" | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.DEPLOY_KEY }} | |
| known_hosts: ${{ secrets.DEPLOY_KNOWN_HOSTS }} | |
| - name: "🌐 Connect to tailscale network" | |
| uses: tailscale/github-action@v4 | |
| with: | |
| oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT }} | |
| oauth-secret: ${{ secrets.TAILSCALE_OAUTH_SECRET }} | |
| tags: tag:github-runner | |
| version: latest | |
| use-cache: "true" | |
| ping: flashhost.tail9eba.ts.net | |
| - name: ✔ Check that connection to flashhost is working | |
| run: | | |
| tailscale --version | |
| tailscale status | |
| tailscale netcheck | |
| tailscale ping flashhost.tail9eba.ts.net | |
| tailscale ping --icmp flashhost.tail9eba.ts.net | |
| ping -c 3 flashhost.tail9eba.ts.net | |
| ssh fab@flashhost.tail9eba.ts.net flashhost_list_images |