Skip to content

Setting up repo environments for Somnia deployments

Van Nguyen edited this page Sep 16, 2025 · 3 revisions

As part of #2343, we added automatic test and prod deployments for Somnia, our Discord bot. This requires some setup of environments on the repo that can be a bit hard to replicate without all the knowledge.

Creating Environments

  1. Please create 2 environments: somnia-prod and somnia-test using these instructions, steps 1-4 image
  2. Optionally, set somnia-prod to be restricted to master branch to avoid incidental deployments from a bad workflow file
  3. In each environment, create 4 secrets as follows. For real GO, you do not need to generate these secret values, instead you can find them here:
    1. AZURE_SUBSCRIPTION: The subscription ID that hosts Somnia
    2. AZURE_TENANT_ID: The tenant ID for the organization that hosts Somnia
    3. AZURE_CLIENT_ID: Client ID of the managed identity to be used for login (see https://github.com/Azure/login/blob/6047d58/README.md#login-with-openid-connect-oidc-recommended)
    4. SOMNIA_CREDENTIALS: These are the credentials of the Discord bot. You can find the template at apps/src/somnia/src/config.empty.json, and you can get these values after creating a Discord application

Clone this wiki locally