mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 15:34:03 +00:00
feat(bot): add /dashboard command and MINI_APP_URL config
- Add /dashboard command to BotFather registration alongside /app - Add new MINI_APP_URL env var for dashboard URL (separate from CORS origins) - Pass MINI_APP_URL and BOT_API_URL in CD workflow - Update Terraform with new variable for future infrastructure deployments
This commit is contained in:
6
.github/workflows/cd.yml
vendored
6
.github/workflows/cd.yml
vendored
@@ -234,15 +234,18 @@ jobs:
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Deploy bot service
|
||||
id: bot-api
|
||||
run: |
|
||||
gcloud run deploy "household-${SERVICE_SUFFIX}-bot-api" \
|
||||
--image "${{ steps.images.outputs.bot_image }}" \
|
||||
--region "${GCP_REGION}" \
|
||||
--project "${{ vars.GCP_PROJECT_ID }}" \
|
||||
--set-env-vars "DB_SCHEMA=${DB_SCHEMA}" \
|
||||
--set-env-vars "DB_SCHEMA=${DB_SCHEMA},MINI_APP_URL=${{ vars.MINI_APP_URL }}" \
|
||||
--allow-unauthenticated \
|
||||
--quiet
|
||||
|
||||
echo "url=$(gcloud run services describe "household-${SERVICE_SUFFIX}-bot-api" --region "${GCP_REGION}" --project "${{ vars.GCP_PROJECT_ID }}" --format 'value(status.url)')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Route traffic to latest bot revision
|
||||
run: |
|
||||
gcloud run services update-traffic "household-${SERVICE_SUFFIX}-bot-api" \
|
||||
@@ -257,6 +260,7 @@ jobs:
|
||||
--image "${{ steps.images.outputs.mini_image }}" \
|
||||
--region "${GCP_REGION}" \
|
||||
--project "${{ vars.GCP_PROJECT_ID }}" \
|
||||
--set-env-vars "BOT_API_URL=${{ steps.bot-api.outputs.url }}" \
|
||||
--allow-unauthenticated \
|
||||
--quiet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user