File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ name : deploy a stack on portainer
2+
3+ on :
4+ workflow_call :
5+ secrets :
6+ portainer_stack_webhook :
7+ required : true
8+ type : string
9+
10+ jobs :
11+ deploy :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Connect to vpn (necessary to access portainer)
15+ run : |
16+ sudo apt install resolvconf
17+ sudo apt install wireguard
18+ echo "${{ secrets.WIREGUARD_CONF }}" > wg0.conf
19+ sudo chmod 600 wg0.conf
20+ echo "setting config"
21+ sudo wg-quick up ./wg0.conf
22+
23+ - name : Trigger Portainer stack webhook
24+ run : |
25+ response=$(curl -X POST -w "%{http_code}" -o /dev/null -s ${{ secrets.portainer_stack_webhook }})
26+ if [ "$response" -ne 204 ]; then
27+ echo "Error: POST request failed with status code $response"
28+ exit 1
29+ fi
You can’t perform that action at this time.
0 commit comments