-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
remote stu.vpn.um.edu.mt 443 tcp-client | ||
nobind | ||
dev tun | ||
compress lzo | ||
pull | ||
tls-client | ||
resolv-retry infinite | ||
mute-replay-warnings | ||
cipher BF-CBC | ||
mute 20 | ||
comp-lzo | ||
|
||
ca ca.crt | ||
cert user.crt | ||
key user.key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Host 10.249.1.100 | ||
StrictHostKeyChecking no | ||
User john |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Deploy to MLRS | ||
on: | ||
push: | ||
branches: | ||
- deploy-action | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Install Open VPN | ||
run: sudo apt-get install openvpn | ||
|
||
- name: Connect VPN | ||
uses: golfzaptw/action-connect-ovpn@master | ||
id: connect_vpn | ||
with: | ||
FILE_OVPN: '.github/vpn/config.ovpn' | ||
env: | ||
CA_CRT: ${{ secrets.CA_CRT }} | ||
USER_CRT: ${{ secrets.USER_CRT }} | ||
USER_KEY: ${{ secrets.USER_KEY }} | ||
|
||
- name: Check Connect VPN | ||
run: echo ${{ steps.connect_vpn.outputs.STATUS }} | ||
|
||
- name: Setup SSH | ||
run: | | ||
mkdir -p ~/.ssh | ||
chmod 700 ~/.ssh | ||
cp .github/vpn/config.ssh ~/.ssh/config | ||
chmod 600 ~/.ssh/config | ||
cat > ~/.ssh/id_rsa <<< "${{ secrets.SSH_PRIVATE_KEY }}" | ||
chmod 600 ~/.ssh/id_rsa | ||
- name: Run deploy script | ||
run: ./deploy.sh | ||
|
||
- name: Close VPN | ||
if: always() | ||
run: sudo killall openvpn |