-
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 1.44 KB
/
Copy pathdiag-scheme.yml
File metadata and controls
31 lines (28 loc) · 1.44 KB
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
name: Diagnose site endpoint scheme
on:
workflow_dispatch:
jobs:
diagnose:
runs-on: ubuntu-latest
steps:
- name: Inspect endpoint value shape
env:
ENDPOINT: ${{ secrets.HOMEPAGE_BUNNY_S3_ENDPOINT }}
SHARE_ENDPOINT: ${{ secrets.BUNNY_S3_ENDPOINT }}
run: |
echo "site has https://: $( [[ "$ENDPOINT" == https://* ]] && echo YES || echo NO )"
echo "site has http://: $( [[ "$ENDPOINT" == http://* ]] && echo YES || echo NO )"
echo "site length: ${#ENDPOINT}"
echo "share has https://: $( [[ "$SHARE_ENDPOINT" == https://* ]] && echo YES || echo NO )"
echo "share has http://: $( [[ "$SHARE_ENDPOINT" == http://* ]] && echo YES || echo NO )"
echo "share length: ${#SHARE_ENDPOINT}"
- name: Test explicit https to site host
env:
ENDPOINT: ${{ secrets.HOMEPAGE_BUNNY_S3_ENDPOINT }}
run: |
HOST=$(echo "$ENDPOINT" | sed -E 's#^https?://##; s#[/:].*##')
echo "testing https://${HOST}/ ..."
timeout 30 curl -sv --max-time 25 "https://${HOST}/" 2>&1 | grep -E "Connected to|SSL connection|subjectAltName|verify result|HTTP/|error|could not|Failed" || echo "curl https FAILED"
echo "---"
echo "testing http://${HOST}/ ..."
timeout 30 curl -sv --max-time 25 "http://${HOST}/" 2>&1 | grep -E "Connected to|HTTP/|Location:|error|could not|Failed" || echo "curl http FAILED"