This action starts a VPN session using OpenVPN 3 and give you the option to run any bash script during the session. We recommend you to store your config files in GitHub using encrypted secrets.
Note: this action only support linux (
ubuntu
). Please use one of the virtual environments for linux (ubuntu
) supported by GitHub Actions.
Reference Links:
- uses: dbritto-dev/openvpn3-action@main
with:
# Description: OpenVPN 3 profile file (.ovpn/.conf).
# Encoded: Base64
# Required: true
vpn-client-config: ""
# Description: OpenVPN 3 Autoload config file (.autoload). If this input is provided we use
# `openvpn3-autoload` instead of `openvpn3` to start the VPN session.
# OpenVPN 3 does support `auth-user-pass` through `openvpn3-autoload` utility.
# To read more about OpenVPN 3 and `auth-user-pass` go to https://openvpn.net/blog/openvpn-3-linux-and-auth-user-pass/
# Encoded: Base64
# Required: false
# Default: ''
vpn-autoload-config: ""
# Description: Bash script to run after the session was started and before the session was closed.
# Required: true
script: |
echo "Hello Developer!"
on: [push]
jobs:
testing:
runs-on: ubuntu-latest
steps:
- uses: dbritto-dev/openvpn3-action@main
with:
vpn-client-config: ${{ secrets.VPN_CLIENT_CONFIG }}
script: |
sudo openvpn3 sessions-list
on: [push]
jobs:
testing:
runs-on: ubuntu-latest
steps:
- uses: dbritto-dev/openvpn3-action@main
with:
vpn-client-config: ${{ secrets.VPN_CLIENT_CONFIG }}
vpn-autoload-config: ${{ secrets.VPN_AUTOLOAD_CONFIG }}
script: |
sudo openvpn3 sessions-list
Note: this approach should be deprecated soon. Please use do not use
vpn-autoload-config
anymore.
The scripts and documentation in this project are released under the MIT License