Skip to content

Github action for connecting to OpenVPN server - fork for ca_cert and client_cert

License

Notifications You must be signed in to change notification settings

FoundrySpatial/github-openvpn-connect-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-openvpn-connect-action

Github action for connecting to OpenVPN server.

Inputs

General Inputs

Name Description Required
config_file Location of OpenVPN client config file yes

Authentication Inputs

Supported authentication methods:

  • Username & password auth
  • Client certificate auth
  • Both of them
Name Description Required when
username Username Username-password auth
password Password Username-password auth
client_key Local peer's private key Client certificate auth
tls_auth_key Pre-shared secret for TLS-auth HMAC signature Optional
ca_cert Certificate authority Optional
client_cert Client certificate Optional

Note: It is strongly recommended that you provide all credentials via encrypted secrets.

Usage

  • Create client configuration file based on the official sample. It is recommended to use inline certificates to include them directly in configuration file like this.
  • Usage in your workflow is like following:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Install OpenVPN
        run: |
          sudo apt update
          sudo apt install -y openvpn openvpn-systemd-resolved
      - name: Connect to VPN
        uses: "kota65535/github-openvpn-connect-action@v1"
        with:
          config_file: ./github/workflows/client.ovpn
          username: ${{ secrets.OVPN_USERNAME }}
          password: ${{ secrets.OVPN_PASSWORD }}
          client_key: ${{ secrets.OVPN_CLIENT_KEY }}
          ca_cert: ${{ secrets.OVPN_CA_CERT }}
          client_cert: ${{ secrets.OVPN_CLIENT_CERT }}
          tls_auth_key: ${{ secrets.OVPN_TLS_AUTH_KEY }}
      - name: Build something
        run: ./gradlew clean build
      # The openvpn process is automatically terminated in post-action phase

License

MIT

About

Github action for connecting to OpenVPN server - fork for ca_cert and client_cert

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%