Skip to content

Commit

Permalink
Integrating actions-connect-ovpn GitHub Action into project (#16396)
Browse files Browse the repository at this point in the history
* Integrating actions-connect-ovpn GitHub Action into project.
* Including a validation block to identify system status
  • Loading branch information
emvaldes authored Nov 5, 2024
1 parent a80c171 commit 7895c62
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions .github/actions/vpn-azure/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion .github/vpn/test.ovpn
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ key user.key
script-security 2
up /etc/openvpn/update-systemd-resolved
down /etc/openvpn/update-systemd-resolved
down-pre
down-pre

0 comments on commit 7895c62

Please sign in to comment.