-
Notifications
You must be signed in to change notification settings - Fork 244
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.
- Please create 2 environments:
somnia-prodandsomnia-testusing these instructions, steps 1-4
- Optionally, set
somnia-prodto be restricted tomasterbranch to avoid incidental deployments from a bad workflow file - 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:
-
AZURE_SUBSCRIPTION: The subscription ID that hosts Somnia -
AZURE_TENANT_ID: The tenant ID for the organization that hosts Somnia -
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) -
SOMNIA_CREDENTIALS: These are the credentials of the Discord bot. You can find the template atapps/src/somnia/src/config.empty.json, and you can get these values after creating a Discord application- Discord app instructions: https://discord.com/developers/docs/quick-start/getting-started
-
tokenis the bot token.clientidis the Application ID - Set the entire JSON object as the secret value
-