diff --git a/.github/actions/action-connect-ovpn/.gitignore b/.github/actions/connect-ovpn/.gitignore similarity index 100% rename from .github/actions/action-connect-ovpn/.gitignore rename to .github/actions/connect-ovpn/.gitignore diff --git a/.github/actions/action-connect-ovpn/README.md b/.github/actions/connect-ovpn/README.md similarity index 100% rename from .github/actions/action-connect-ovpn/README.md rename to .github/actions/connect-ovpn/README.md diff --git a/.github/actions/action-connect-ovpn/action.yml b/.github/actions/connect-ovpn/action.yml similarity index 82% rename from .github/actions/action-connect-ovpn/action.yml rename to .github/actions/connect-ovpn/action.yml index 1aeac9d9876..220338866d6 100644 --- a/.github/actions/action-connect-ovpn/action.yml +++ b/.github/actions/connect-ovpn/action.yml @@ -34,6 +34,16 @@ runs: sudo apt-get install openvpn-systemd-resolved shell: bash + - name: Validate OpenVPN + run: | + echo -e "\nOpenVPN Version:" ; + openvpn --version ; + echo -e "\nPinging URL: ${{ inputs.PING_URL }}" ; + ping -c 3 ${{ inputs.PING_URL }} ; + echo -e "\nIP Route:" ; + ip route ; + shell: bash + - name: Connect VPN env: TLS_KEY: ${{ inputs.TLS_KEY }} @@ -48,6 +58,8 @@ runs: echo "$USER_CRT" | base64 -d > user.crt echo "$USER_KEY" | base64 -d > user.key echo "$SECRET" | base64 -d > secret.txt + + echo -e "sudo openvpn --config ${{ inputs.FILE_OVPN }} --daemon" ; sudo openvpn --config ${{ inputs.FILE_OVPN }} --daemon - name: VPN Status diff --git a/.github/actions/action-connect-ovpn/example.ovpn b/.github/actions/connect-ovpn/example.ovpn similarity index 100% rename from .github/actions/action-connect-ovpn/example.ovpn rename to .github/actions/connect-ovpn/example.ovpn diff --git a/.github/actions/vpn-azure/action.yml b/.github/actions/vpn-azure/action.yml index 7dd45a24d3e..faba23787a2 100644 --- a/.github/actions/vpn-azure/action.yml +++ b/.github/actions/vpn-azure/action.yml @@ -40,9 +40,7 @@ runs: sed -i "s/\(dhcp-option DNS \).*/\1${{ inputs.dns-ip }}/" .github/vpn/${{ inputs.env-name }}.ovpn shell: bash - - uses: josiahsiegel/action-connect-ovpn@794339aff94452216c97f609476c367a43a31295 - ## DevSecOps - Aquia (Replace) - uses: ./.github/actions/action-connect-ovpn - + - uses: ./.github/actions/connect-ovpn if: inputs.env-name && inputs.ca-cert != 'false' id: connect_vpn with: diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c5b2158da31..498f787b167 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -121,7 +121,7 @@ updates: interval: "daily" - package-ecosystem: "github-actions" - directory: "/.github/actions/action-connect-ovpn" + directory: "/.github/actions/connect-ovpn" schedule: interval: "daily" diff --git a/.github/vpn/test.ovpn b/.github/vpn/test.ovpn index 0495febb2d8..fe408202b81 100644 --- a/.github/vpn/test.ovpn +++ b/.github/vpn/test.ovpn @@ -45,4 +45,4 @@ key user.key script-security 2 up /etc/openvpn/update-systemd-resolved down /etc/openvpn/update-systemd-resolved -down-pre \ No newline at end of file +down-pre