Skip to content

Commit

Permalink
feat: Add GitHub workflow for testing OpenVPN connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Armadillidiid committed Mar 13, 2024
1 parent 46fdf56 commit c25556c
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test-ovpn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: OpenVPN
on:
workflow_dispatch:

jobs:
build:
name: Connect to OpenVPN
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install OpenVPN
run: |
sudo apt update
sudo apt install -y openvpn openvpn-systemd-resolved
- name: Create OpenVPN config
run: |
echo "${{ secrets.OPENVPN_CONFIG }}" > ./client.ovpn
- name: Connect to VPN
uses: "kota65535/github-openvpn-connect-action@v2"
with:
config_file: ./client.ovpn
client_key: ${{ secrets.OVPN_CLIENT_KEY }}
tls_auth_key: ${{ secrets.OVPN_TLS_AUTH_KEY }}

- name: Test VPN connection
timeout-minutes: 1
run: until ping -c1 ${{ secrets.SERVER_IP_ADDRESS }}; do sleep 2; done

0 comments on commit c25556c

Please sign in to comment.