MentraOS / .github /workflows /cloud-v2-debug.yml
Anirudh1950's picture
Add files using upload-large-folder tool
dde4dfc verified
Raw History Blame Contribute Delete
2.14 kB
name: Deploy cloud-v2 debug
on:
workflow_dispatch:
push:
branches:
- mapbox-integration
- cloud-v2/debug
- cloud-v2/debug/**
paths:
- "cloud-v2/**"
- ".github/workflows/cloud-v2-debug.yml"
concurrency:
group: cloud-v2-debug-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
deploy:
name: Deploy cloud-debug to AWS us-west-2
runs-on: blacksmith-4vcpu-ubuntu-2404
env:
PORTER_CLUSTER: "5692"
PORTER_PROJECT: "15081"
PORTER_DEPLOYMENT_TARGET_ID: 87f939d6-b019-4955-9f4b-1050e8ff57bd
PORTER_HOST: https://dashboard.porter.run
PORTER_APP_NAME: cloud-debug
PORTER_REPO_NAME: ${{ github.event.repository.name }}
PORTER_TOKEN: ${{ secrets.PORTER_TOKEN }}
CORE_HOSTNAME: core.debug.us-west-2.mentraglass.com
RUNTIME_HOSTNAME: runtime.debug.us-west-2.mentraglass.com
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set Git SHA tag
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.14"
- name: Setup Porter CLI
uses: porter-dev/setup-porter@v0.1.0
- name: Deploy cloud-debug app
timeout-minutes: 45
working-directory: cloud-v2
env:
PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
run: porter apply -w -f porter.debug.yaml
- name: Verify debug health
run: |
set -euo pipefail
if ! getent hosts "${CORE_HOSTNAME}" >/dev/null || ! getent hosts "${RUNTIME_HOSTNAME}" >/dev/null; then
echo "::warning::Debug DNS is not configured yet; skipping public health checks."
exit 0
fi
curl --retry 12 --retry-delay 10 --retry-all-errors -fsS "https://${CORE_HOSTNAME}/healthz"
echo
curl --retry 12 --retry-delay 10 --retry-all-errors -fsS "https://${RUNTIME_HOSTNAME}/healthz"
echo