Skip to content

Keep CVE App Awake

Keep CVE App Awake #5

Workflow file for this run

name: Keep CVE App Awake
on:
schedule:
# Runs every 10 minutes to keep the app awake
- cron: '*/10 * * * *'
workflow_dispatch: # Allows manual triggering from GitHub
jobs:
ping-app:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Ping Health Endpoint
run: |
echo "🔍 Pinging CVE Insight Tool health endpoint..."
# CVE Insight Tool Render app URL
APP_URL="https://cve-insight-tool.onrender.com"
response=$(curl -s -o /dev/null -w "%{http_code}" "${APP_URL}/health" --max-time 20)
if [ $response -eq 200 ]; then
echo "✅ App is healthy (HTTP $response)"
echo "App successfully pinged at: $(date)"
else
echo "⚠️ App returned HTTP $response"
echo "This might be normal if the app was sleeping and is now waking up"
# Try main endpoint as backup
main_response=$(curl -s -o /dev/null -w "%{http_code}" "${APP_URL}" --max-time 30)
echo "Main endpoint returned: HTTP $main_response"
fi
- name: Log Ping Status
run: |
echo "📊 Keep-alive ping completed"
echo "Next ping scheduled in 10 minutes"
echo "Workflow run #${{ github.run_number }}"