Skip to content

Commit

Permalink
Merge pull request #13 from khushmeeet/nomad
Browse files Browse the repository at this point in the history
Added tailscale steps to connect to server
  • Loading branch information
khushmeeet authored Sep 15, 2023
2 parents b5d2443 + 5078324 commit f82613b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/hetzner_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,31 @@ jobs:
sudo apt-get install -y ansible
python -m pip install --upgrade pip
- name: Tailscale
uses: tailscale/github-action@v1
with:
authkey: ${{ secrets.TAILSCALE_EPHEMERAL_KEY }}

- name: Check out repository code
uses: actions/checkout@v3

- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/server.key
chmod 600 ~/.ssh/server.key
cat >>~/.ssh/config <<END
Host server
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/server.key
StrictHostKeyChecking no
END
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}

- name: Run Ansible Playbook
run: |
ansible-playbook ansible/setup-server.yml

0 comments on commit f82613b

Please sign in to comment.