-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (30 loc) · 978 Bytes
/
vpn-access.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Test VPN
on:
pull_request:
workflow_dispatch:
jobs:
test-vpn:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: cURL without VPN
run: |
curl -A "POC-GHActions-CI-Wireguard-VPN" ${{ secrets.WEBHOOK_ENDPOINT }}?type=without-vpn-1
- name: Attach WireGuard connection
shell: bash
run: |
sudo apt install resolvconf
sudo apt install wireguard
echo "${{ secrets.WIREGUARD_CONFIG }}" > wg0.conf
sudo chmod 600 wg0.conf
sudo wg-quick up ./wg0.conf
- name: cURL without VPN
run: |
curl -A "POC-GHActions-CI-Wireguard-VPN" ${{ secrets.WEBHOOK_ENDPOINT }}?type=with-vpn-1
- name: Detach WireGuard connection
shell: bash
run: sudo wg-quick down ./wg0.conf
- name: cURL without VPN
run: |
curl -A "POC-GHActions-CI-Wireguard-VPN" ${{ secrets.WEBHOOK_ENDPOINT }}?type=without-vpn-2