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_TOKEN
already available on all repos) - Re-Run your Job with
Enable debug logging
on 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 }}
containerMode
is by default to True, because on Kubernetes, runners don't have access to TUN interfacedebugEnabled
is provided by secrets.ACTIONS_STEP_DEBUG Enabling debug logging featureslackChannel
andslackToken
are used to send SSH informations on slack channeldebug
is used to print out the WAN IP of tailscale tunnelversion
is used to overwrite the default version use in this action. You will need to providesha256sum
as 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