Skip to content

Commit c88c884

Browse files
committed
Okay environment variables are dumb
1 parent 7c9ee81 commit c88c884

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
--from-literal=GUILD_ID=${{ secrets.GUILD_ID }} \
9393
--from-literal=GH_READ_TOKEN=${{ secrets.GH_READ_TOKEN }} \
9494
--from-literal=AMPLITUDE_KEY=${{ secrets.AMPLITUDE_KEY }} \
95+
--from-literal=REACTIBOT_API_KEY=${{ secrets.REACTIBOT_API_KEY }} \
9596
--from-literal=OPENAI_KEY=${{ secrets.OPENAI_KEY }} \
9697
|| echo \n
9798
kubectl apply -k .

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ Contact @vcarl (`@vcarl#7694` in Discord) for help getting into the test server.
88

99
See [the contributing guide](./CONTRIBUTING.md) for specific instructions.
1010

11+
### Adding a new environment variable
12+
13+
This is dumb and I hate it but it's how the tools work together.
14+
15+
New secrets need to be added in a bunch of different places in order to work in production:
16+
17+
- the GitHub [secrets config for Reactibot in settings](https://github.com/reactiflux/reactibot/settings/secrets/actions)
18+
- [env.ts](https://github.com/reactiflux/reactibot/blob/main/src/helpers/env.ts) to load it from the environment (please do not freely use `process.env`)
19+
- [our deployment action](https://github.com/reactiflux/reactibot/blob/main/.github/workflows/node.js.yml#L88), under the Kubernetes secret creation step
20+
- [the Kubernetes deployment config](https://github.com/reactiflux/reactibot/blob/main/cluster/deployment.yaml#L18)
21+
1122
## Testing deployment
1223

1324
You must have a working `.env` file that enables you to run the bot locally. With the values in `.env`, create a `reactibot-env` secret in your local minikube cluster. Everything must be provided a value, but it's okay if some of them are just random strings.

0 commit comments

Comments
 (0)