File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ' Add SSH Private key'
2+ description : ' Connect your GitHub Action workflow to Tailscale'
3+ branding :
4+ icon : ' arrow-right-circle'
5+ color : ' green'
6+ inputs :
7+ private_key :
8+ description : ' SSH Private key'
9+ required : true
10+ runs :
11+ using : ' composite'
12+ steps :
13+ - name : Check Runner OS
14+ if : ${{ runner.os != 'Linux' }}
15+ shell : bash
16+ run : |
17+ echo "::error title=⛔ error hint::Support Linux Only"
18+ exit 1
19+ - name : Start SSH agent with a key
20+ env :
21+ SSH_AUTH_SOCK : /tmp/ssh_agent.sock
22+ run : |
23+ mkdir -p ~/.ssh
24+ ssh-keyscan github.com >> ~/.ssh/known_hosts
25+ ssh-agent -a $SSH_AUTH_SOCK > /dev/null
26+ ssh-add - <<< "${{ inputs.private_key }}"
27+ echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments