From 784b709a72e67eefa40e42731aea288918df9ef6 Mon Sep 17 00:00:00 2001 From: James Otten Date: Wed, 31 Jul 2024 20:48:21 -0400 Subject: [PATCH] add wg --- .github/workflows/publish-and-deploy.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/publish-and-deploy.yaml b/.github/workflows/publish-and-deploy.yaml index 144210e..9a13396 100644 --- a/.github/workflows/publish-and-deploy.yaml +++ b/.github/workflows/publish-and-deploy.yaml @@ -44,6 +44,14 @@ jobs: needs: push_to_registry runs-on: ubuntu-latest steps: + - name: Setup WireGuard + run: | + sudo apt install wireguard + echo "${{ secrets.WIREGUARD_PRIVATE_KEY }}" > privatekey + sudo ip link add dev wg0 type wireguard + sudo ip address add dev wg0 ${{ secrets.WIREGUARD_OVERLAY_NETWORK_IP }} peer ${{ secrets.WIREGUARD_PEER }} + sudo wg set wg0 listen-port 48123 private-key privatekey peer ${{ secrets.WIREGUARD_PEER_PUBLIC_KEY }} allowed-ips 0.0.0.0/0 endpoint ${{ secrets.WIREGUARD_ENDPOINT }} + sudo ip link set up dev wg0 - name: Install SSH key uses: shimataro/ssh-key-action@d4fffb50872869abe2d9a9098a6d9c5aa7d16be4 # v2 with: