Keep CVE App Awake #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }}" |