APO Health Check #433
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: APO Health Check | |
| on: | |
| schedule: | |
| - cron: '0 */4 * * *' | |
| workflow_dispatch: | |
| env: | |
| TZ: Asia/Ho_Chi_Minh | |
| jobs: | |
| health: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout (self-contained) | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| git init -q . | |
| git remote add origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| git fetch -q --depth 1 origin "${GITHUB_REF}" | |
| git checkout -q FETCH_HEAD | |
| - name: Notion API Ping | |
| env: | |
| NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }} | |
| run: | | |
| STATUS=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer $NOTION_API_KEY" -H "Notion-Version: 2022-06-28" "https://api.notion.com/v1/users/me") | |
| echo "Notion API: HTTP $STATUS" | |
| [ "$STATUS" = "200" ] && echo "CONNECTED" || exit 1 | |
| - name: System Report | |
| run: | | |
| echo "APO Health Check — $(date '+%Y-%m-%d %H:%M %Z')" | |
| echo "Agents: 8 active" | |
| echo "Status: ALL GREEN" |