This commit is contained in:
@@ -11,14 +11,6 @@ jobs:
|
||||
steps:
|
||||
- name: Trigger Portainer stack redeploy
|
||||
run: |
|
||||
python3 -c "
|
||||
import urllib.request, sys
|
||||
url = '${{ secrets.PORTAINER_WEBHOOK }}'
|
||||
req = urllib.request.Request(url, method='POST')
|
||||
try:
|
||||
resp = urllib.request.urlopen(req)
|
||||
print('Redeploy triggered (HTTP', resp.status, ')')
|
||||
except urllib.error.HTTPError as e:
|
||||
print('Portainer webhook failed (HTTP', e.code, ')')
|
||||
sys.exit(1)
|
||||
"
|
||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST "${{ secrets.PORTAINER_WEBHOOK }}")
|
||||
echo "HTTP: $HTTP_CODE"
|
||||
[ "$HTTP_CODE" = "200" ] || [ "$HTTP_CODE" = "204" ] || exit 1
|
||||
|
||||
Reference in New Issue
Block a user