Hugging Face Github action to connect to tailscale (Based from https://github.com/tailscale/github-action)
You can use this github action for 2 differents use cases :
Ask for the TAILSCALE_AUTHKEY secret and add this step to your workflow.
- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}- Add this step to your workflow (
TAILSCALE_SSH_AUTHKEY,SLACK_CIFEEDBACK_CHANNEL,SLACK_CIFEEDBACK_BOT_TOKENalready available on all repos) - Re-Run your Job with
Enable debug loggingon the github popup - Join the slack channel #github-runners, you will receive a slack message.
WARNING : if you have a workflow with a lot of jobs, don't run your workflow with Enable debug logging
- name: Tailscale
uses: huggingface/tailscale-action@main
with:
authkey: ${{ secrets.TAILSCALE_SSH_AUTHKEY }}
debugEnabled: ${{ secrets.ACTIONS_STEP_DEBUG }}
slackChannel: ${{ secrets.SLACK_CIFEEDBACK_CHANNEL }}
slackToken: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}containerModeis by default to True, because on Kubernetes, runners don't have access to TUN interfacedebugEnabledis provided by secrets.ACTIONS_STEP_DEBUG Enabling debug logging featureslackChannelandslackTokenare used to send SSH informations on slack channeldebugis used to print out the WAN IP of tailscale tunnelversionis used to overwrite the default version use in this action. You will need to providesha256sumas well.
You can add this step at the end of your job, if you want to keep the session alive (don't forget to logoff from the runner at the end)
- name: Wait for SSH
run : |
sleep 30s
while [ "$(last | grep '^runner.*still logged in$')" ]; do sleep 1m; done