GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ci: fix HMAC signature, TLS verification and deploy polling · axeptio/wordpress-plugin@f58120b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • deploy-demo.yml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/deploy-demo.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/deploy-demo.yml
+20-17Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,27 +70,27 @@ jobs:
7070

7171
- name: Upload plugin zip to server
7272
run: |
73-
SIGNATURE="sha256=$(echo -n "@/tmp/plugin.zip" | openssl dgst -sha256 -hmac "${{ secrets.DEMO_WEBHOOK_SECRET }}" | awk '{print $2}')"
73+
SIGNATURE="sha256=$(openssl dgst -sha256 -hmac "${{ secrets.DEMO_WEBHOOK_SECRET }}" /tmp/plugin.zip | awk '{print $2}')"
7474
75-
curl -sk --fail \
75+
curl -s --fail \
7676
-X PUT \
77-
-H "Host: ${{ env.DEMO_DOMAIN }}" \
77+
--resolve "${{ env.DEMO_DOMAIN }}:443:${{ env.DEMO_IP }}" \
7878
-H "X-Webhook-Signature: ${SIGNATURE}" \
7979
--data-binary @/tmp/plugin.zip \
80-
"https://${{ env.DEMO_IP }}/deploy-artifact.php"
80+
"https://${{ env.DEMO_DOMAIN }}/deploy-artifact.php"
8181
8282
- name: Trigger deployment
8383
run: |
8484
PAYLOAD='{"artifact_url":"local:///opt/deploy/plugin.zip","github_token":""}'
8585
SIGNATURE="sha256=$(echo -n "${PAYLOAD}" | openssl dgst -sha256 -hmac "${{ secrets.DEMO_WEBHOOK_SECRET }}" | awk '{print $2}')"
8686
87-
HTTP_STATUS=$(curl -sk -o /tmp/webhook-response.txt -w "%{http_code}" \
87+
HTTP_STATUS=$(curl -s -o /tmp/webhook-response.txt -w "%{http_code}" \
8888
-X POST \
89-
-H "Host: ${{ env.DEMO_DOMAIN }}" \
89+
--resolve "${{ env.DEMO_DOMAIN }}:443:${{ env.DEMO_IP }}" \
9090
-H "Content-Type: application/json" \
9191
-H "X-Webhook-Signature: ${SIGNATURE}" \
9292
-d "${PAYLOAD}" \
93-
"https://${{ env.DEMO_IP }}/deploy-webhook.php")
93+
"https://${{ env.DEMO_DOMAIN }}/deploy-webhook.php")
9494
9595
cat /tmp/webhook-response.txt
9696
if [ "$HTTP_STATUS" -ne 200 ]; then
@@ -99,15 +99,18 @@ jobs:
9999
fi
100100
echo "✅ Deployment triggered"
101101
102-
- name: Wait for deployment
103-
run: sleep 30
104-
105102
- name: Verify deployment
106103
run: |
107-
HTTP_STATUS=$(curl -sk -o /dev/null -w "%{http_code}" "https://${{ env.DEMO_DOMAIN }}")
108-
if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 400 ]; then
109-
echo "✅ Demo site responding with HTTP $HTTP_STATUS"
110-
else
111-
echo "❌ Demo site returned HTTP $HTTP_STATUS"
112-
exit 1
113-
fi
104+
for i in $(seq 1 12); do
105+
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
106+
--resolve "${{ env.DEMO_DOMAIN }}:443:${{ env.DEMO_IP }}" \
107+
"https://${{ env.DEMO_DOMAIN }}")
108+
if [ "$HTTP_STATUS" -ge 200 ] && [ "$HTTP_STATUS" -lt 400 ]; then
109+
echo "✅ Demo site responding with HTTP $HTTP_STATUS"
110+
exit 0
111+
fi
112+
echo "⏳ Attempt $i/12 — HTTP $HTTP_STATUS, retrying in 5s..."
113+
sleep 5
114+
done
115+
echo "❌ Demo site not responding after 60s"
116+
exit 1

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.