Skip to content

Commit 7895c62

Browse files
authored
Integrating actions-connect-ovpn GitHub Action into project (#16396)
* Integrating actions-connect-ovpn GitHub Action into project. * Including a validation block to identify system status
1 parent a80c171 commit 7895c62

File tree

7 files changed

+15
-5
lines changed

7 files changed

+15
-5
lines changed

.github/actions/action-connect-ovpn/action.yml renamed to .github/actions/connect-ovpn/action.yml

+12
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ runs:
3434
sudo apt-get install openvpn-systemd-resolved
3535
shell: bash
3636

37+
- name: Validate OpenVPN
38+
run: |
39+
echo -e "\nOpenVPN Version:" ;
40+
openvpn --version ;
41+
echo -e "\nPinging URL: ${{ inputs.PING_URL }}" ;
42+
ping -c 3 ${{ inputs.PING_URL }} ;
43+
echo -e "\nIP Route:" ;
44+
ip route ;
45+
shell: bash
46+
3747
- name: Connect VPN
3848
env:
3949
TLS_KEY: ${{ inputs.TLS_KEY }}
@@ -48,6 +58,8 @@ runs:
4858
echo "$USER_CRT" | base64 -d > user.crt
4959
echo "$USER_KEY" | base64 -d > user.key
5060
echo "$SECRET" | base64 -d > secret.txt
61+
62+
echo -e "sudo openvpn --config ${{ inputs.FILE_OVPN }} --daemon" ;
5163
sudo openvpn --config ${{ inputs.FILE_OVPN }} --daemon
5264
5365
- name: VPN Status

.github/actions/vpn-azure/action.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ runs:
4040
sed -i "s/\(dhcp-option DNS \).*/\1${{ inputs.dns-ip }}/" .github/vpn/${{ inputs.env-name }}.ovpn
4141
shell: bash
4242

43-
- uses: josiahsiegel/action-connect-ovpn@794339aff94452216c97f609476c367a43a31295
44-
## DevSecOps - Aquia (Replace) - uses: ./.github/actions/action-connect-ovpn
45-
43+
- uses: ./.github/actions/connect-ovpn
4644
if: inputs.env-name && inputs.ca-cert != 'false'
4745
id: connect_vpn
4846
with:

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ updates:
121121
interval: "daily"
122122

123123
- package-ecosystem: "github-actions"
124-
directory: "/.github/actions/action-connect-ovpn"
124+
directory: "/.github/actions/connect-ovpn"
125125
schedule:
126126
interval: "daily"
127127

.github/vpn/test.ovpn

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ key user.key
4545
script-security 2
4646
up /etc/openvpn/update-systemd-resolved
4747
down /etc/openvpn/update-systemd-resolved
48-
down-pre
48+
down-pre

0 commit comments

Comments
 (0)