File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Add VPN User
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ vpn_ip_address :
7+ description : ' vpn_ip_address'
8+ required : true
9+ default : ' 192.0.2.1'
10+
11+ ssh_username :
12+ description : ' ssh_username'
13+ required : true
14+ default : ' root'
15+
16+ PSONO_SECRET_ID :
17+ description : ' PSONO_SECRET_ID'
18+ required : true
19+
20+ PSONO_SECRET_NEW_VALUE :
21+ description : ' PSONO_SECRET_NEW_VALUE'
22+ required : true
23+
24+ jobs :
25+ build :
26+ runs-on : ubuntu-latest
27+
28+ steps :
29+ - name : Checkout code
30+ uses : actions/checkout@v2
31+
32+ - name : Setting up SSH key
33+ uses : webfactory/ssh-agent@v0.8.0
34+ with :
35+ ssh-private-key : ${{ secrets.VPN_SSH_PRIVATE_KEY }}
36+
37+ - name : SSH into remote host
38+ run : |
39+ ssh -o StrictHostKeyChecking=no ${{ inputs.ssh_username }}@${{ inputs.vpn_ip_address }} "date"
40+
41+ - name : Add ssh user
42+ run : |
43+ ssh -o StrictHostKeyChecking=no ${{ inputs.ssh_username }}@${{ inputs.vpn_ip_address }} "date"
44+ ssh -o StrictHostKeyChecking=no ${{ inputs.ssh_username }}@${{ inputs.vpn_ip_address }} PSONO_CI_API_KEY_ID=${{ secrets.PSONO_CI_API_KEY_ID }} PSONO_CI_API_SECRET_KEY_HEX=${{ secrets.PSONO_CI_API_SECRET_KEY_HEX }} PSONO_CI_SERVER_URL=${{ secrets.PSONO_CI_SERVER_URL }} /etc/wireguard/save-vpn-credentials-to-password-vault.sh ${{ inputs.PSONO_SECRET_NEW_VALUE }} "test"
45+
46+
47+ # Enable tmate debugging of manually-triggered workflows if the input option was provided
48+ - name : Setup tmate session
49+ uses : mxschmitt/action-tmate@v3
50+ if : ${{ failure() }}
You can’t perform that action at this time.
0 commit comments