Test Tailscale

This commit is contained in:
iFargle 2023-12-08 20:41:38 +09:00
parent 6d2638897a
commit 978c1575a8

View file

@ -14,11 +14,34 @@ jobs:
- name: "Setup: Runner" - name: "Setup: Runner"
run: | run: |
apk update apk update
apk add git nodejs nix openssh-client --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ apk add git nodejs nix openssh-client qemu tailscale --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
- name: "Setup: SSH"
run: |
mkdir /root/.ssh
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /root/.ssh/id_ed25519.pub
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
chmod 700 /root/.ssh
chmod 600 /root/.ssh/id_ed25519
chmod 644 /root/.ssh/id_ed25519.pub
- name: "Setup: Headscale"
run: |
tailscaled --cleanup
tailscaled -state=mem: &
tailscale up \
--login-server=https://headscale.sysctl.io \
--accept-routes \
--accept-dns \
--authkey ${{ secrets.TAILSCALE_KEY }} \
--hostname forgejo-runner \
--advertise-tags "tag:forgejo,tag:container,tag:ephemeral"
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: "Directory Structure" - name: "Directory Structure"
run: | run: |
ls ${{ github.workspace }}/* ls ${{ github.workspace }}/*
- name: "Runner: Node Info" - name: "Runner: Node Info"
run: | run: |
echo "pwd" echo "pwd"
@ -37,18 +60,10 @@ jobs:
whoami whoami
echo "cat /etc/resolv.conf" echo "cat /etc/resolv.conf"
cat /etc/resolv.conf cat /etc/resolv.conf
- name: "Nix Version" - name: "Nix Version"
run: | run: |
nix --version nix --version
- name: "Setup: SSH"
run: |
mkdir /root/.ssh
echo "${{ secrets.SSH_PUBLIC_KEY }}" > /root/.ssh/id_ed25519.pub
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /root/.ssh/id_ed25519
chmod 700 /root/.ssh
chmod 600 /root/.ssh/id_ed25519
chmod 644 /root/.ssh/id_ed25519.pub
ssh -o "StrictHostKeyChecking=no" albert@100.64.0.14 "ls /Storage"
# - name: "Nix build" # - name: "Nix build"
# run: | # run: |
# echo "Running Nix Build" # echo "Running Nix Build"