Skip to content

Commit

Permalink
Merge pull request #264 from meetnearme/fix/cloudflare-kv-env-vars-2
Browse files Browse the repository at this point in the history
[fix] more env var cleanup / fixes
  • Loading branch information
brianfeister authored Jan 9, 2025
2 parents 6a6ce3f + 8200fa5 commit 2b05602
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
11 changes: 7 additions & 4 deletions .github/actions/set_aws_creds_env_vars/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ inputs:
PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET:
description: 'Stripe (prod) checkout webhook signing secret'
required: true
CLOUDFLARE_API_BASE_URL:
description: 'The base URL for the Cloudflare API'
required: true
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE:
description: 'The Namespace key for the project Cloudflare KV Storage'
required: true
Expand Down Expand Up @@ -113,10 +116,6 @@ runs:
echo ZITADEL_ENCRYPTION_KEY=${{ inputs.ZITADEL_ENCRYPTION_KEY }} >> .env
echo ZITADEL_INSTANCE_HOST=${{ inputs.ZITADEL_INSTANCE_HOST }} >> .env
echo ZITADEL_BOT_ADMIN_TOKEN=${{ inputs.ZITADEL_BOT_ADMIN_TOKEN }} >> .env
echo CLOUDFLARE_ACCOUNT_ID=${{ inputs.CLOUDFLARE_ACCOUNT_ID }} >> .env
echo CLOUDFLARE_KV_NAMESPACE_ID=${{ inputs.CLOUDFLARE_KV_NAMESPACE_ID }} >> .env
echo CLOUDFLARE_API_TOKEN=${{ inputs.CLOUDFLARE_API_TOKEN }} >> .env
echo CLOUDFLARE_API_BASE_URL=${{ inputs.CLOUDFLARE_API_BASE_URL }} >> .env
echo MARQO_API_KEY=${{ inputs.MARQO_API_KEY }} >> .env
echo PROD_MARQO_API_BASE_URL=${{ inputs.PROD_MARQO_API_BASE_URL }} >> .env
echo DEV_MARQO_API_BASE_URL=${{ inputs.DEV_MARQO_API_BASE_URL }} >> .env
Expand All @@ -128,6 +127,10 @@ runs:
echo DEV_STRIPE_PUBLISHABLE_KEY=${{ inputs.DEV_STRIPE_PUBLISHABLE_KEY }} >> .env
echo DEV_STRIPE_CHECKOUT_WEBHOOK_SECRET=${{ inputs.DEV_STRIPE_CHECKOUT_WEBHOOK_SECRET }} >> .env
echo PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET=${{ inputs.PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET }} >> .env
echo CLOUDFLARE_ACCOUNT_ID=${{ inputs.CLOUDFLARE_ACCOUNT_ID }} >> .env
echo CLOUDFLARE_KV_NAMESPACE_ID=${{ inputs.CLOUDFLARE_KV_NAMESPACE_ID }} >> .env
echo CLOUDFLARE_API_TOKEN=${{ inputs.CLOUDFLARE_API_TOKEN }} >> .env
echo CLOUDFLARE_API_BASE_URL=${{ inputs.CLOUDFLARE_API_BASE_URL }} >> .env
echo CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE=${{ inputs.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE }} >> .env
echo CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID=${{ inputs.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID }} >> .env
- name: Configure AWS credentials
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,13 @@ jobs:
SCRAPINGBEE_API_KEY: ${{ secrets.SCRAPINGBEE_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_BASE_URL: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_BASE_URL: ${{ secrets.OPENAI_API_BASE_URL }}
ZITADEL_CLIENT_ID: ${{ secrets.ZITADEL_CLIENT_ID }}
ZITADEL_CLIENT_SECRET: ${{ secrets.ZITADEL_CLIENT_SECRET }}
ZITADEL_PROJECT_ID: ${{ secrets.ZITADEL_PROJECT_ID }}
ZITADEL_ENCRYPTION_KEY: ${{ secrets.ZITADEL_ENCRYPTION_KEY }}
ZITADEL_INSTANCE_HOST: ${{ secrets.ZITADEL_INSTANCE_HOST }}
ZITADEL_BOT_ADMIN_TOKEN: ${{ secrets.ZITADEL_BOT_ADMIN_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_NAMESPACE_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_API_BASE_URL: ${{ secrets.CLOUDFLARE_API_BASE_URL }}
MARQO_API_KEY: ${{ secrets.MARQO_API_KEY }}
PROD_MARQO_API_BASE_URL: ${{ secrets.PROD_MARQO_API_BASE_URL }}
DEV_MARQO_API_BASE_URL: ${{ secrets.DEV_MARQO_API_BASE_URL }}
Expand All @@ -73,6 +69,10 @@ jobs:
DEV_STRIPE_PUBLISHABLE_KEY: ${{ secrets.DEV_STRIPE_PUBLISHABLE_KEY }}
DEV_STRIPE_CHECKOUT_WEBHOOK_SECRET: ${{ secrets.DEV_STRIPE_CHECKOUT_WEBHOOK_SECRET }}
PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET: ${{ secrets.PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET }}
CLOUDFLARE_API_BASE_URL: ${{ secrets.CLOUDFLARE_API_BASE_URL }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_NAMESPACE_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE: ${{ secrets.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE }}
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID }}
- name: Generate Cloudflare locations Go file
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ jobs:
ZITADEL_ENCRYPTION_KEY: ${{ secrets.ZITADEL_ENCRYPTION_KEY }}
ZITADEL_INSTANCE_HOST: ${{ secrets.ZITADEL_INSTANCE_HOST }}
ZITADEL_BOT_ADMIN_TOKEN: ${{ secrets.ZITADEL_BOT_ADMIN_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_NAMESPACE_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_API_BASE_URL: ${{ secrets.CLOUDFLARE_API_BASE_URL }}
MARQO_API_KEY: ${{ secrets.MARQO_API_KEY }}
PROD_MARQO_API_BASE_URL: ${{ secrets.PROD_MARQO_API_BASE_URL }}
DEV_MARQO_API_BASE_URL: ${{ secrets.DEV_MARQO_API_BASE_URL }}
Expand All @@ -80,6 +76,10 @@ jobs:
DEV_STRIPE_PUBLISHABLE_KEY: ${{ secrets.DEV_STRIPE_PUBLISHABLE_KEY }}
DEV_STRIPE_CHECKOUT_WEBHOOK_SECRET: ${{ secrets.DEV_STRIPE_CHECKOUT_WEBHOOK_SECRET }}
PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET: ${{ secrets.PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET }}
CLOUDFLARE_API_BASE_URL: ${{ secrets.CLOUDFLARE_API_BASE_URL }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_NAMESPACE_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE: ${{ secrets.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE }}
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID }}
# Not set because this is dynamic in lower environments
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ jobs:
ZITADEL_ENCRYPTION_KEY: ${{ secrets.ZITADEL_ENCRYPTION_KEY }}
ZITADEL_INSTANCE_HOST: ${{ secrets.ZITADEL_INSTANCE_HOST }}
ZITADEL_BOT_ADMIN_TOKEN: ${{ secrets.ZITADEL_BOT_ADMIN_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_NAMESPACE_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_API_BASE_URL: ${{ secrets.CLOUDFLARE_API_BASE_URL }}
MARQO_API_KEY: ${{ secrets.MARQO_API_KEY }}
PROD_MARQO_API_BASE_URL: ${{ secrets.PROD_MARQO_API_BASE_URL }}
DEV_MARQO_API_BASE_URL: ${{ secrets.DEV_MARQO_API_BASE_URL }}
Expand All @@ -73,6 +69,10 @@ jobs:
DEV_STRIPE_PUBLISHABLE_KEY: ${{ secrets.DEV_STRIPE_PUBLISHABLE_KEY }}
DEV_STRIPE_CHECKOUT_WEBHOOK_SECRET: ${{ secrets.DEV_STRIPE_CHECKOUT_WEBHOOK_SECRET }}
PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET: ${{ secrets.PROD_STRIPE_CHECKOUT_WEBHOOK_SECRET }}
CLOUDFLARE_API_BASE_URL: ${{ secrets.CLOUDFLARE_API_BASE_URL }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_KV_NAMESPACE_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE: ${{ secrets.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE }}
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID: ${{ secrets.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID }}
- name: Generate Cloudflare locations Go file
Expand Down
4 changes: 3 additions & 1 deletion stacks/shared/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ export default {
ZITADEL_ENCRYPTION_KEY: process.env.ZITADEL_ENCRYPTION_KEY,
ZITADEL_INSTANCE_HOST: process.env.ZITADEL_INSTANCE_HOST,
ZITADEL_BOT_ADMIN_TOKEN: process.env.ZITADEL_BOT_ADMIN_TOKEN,
CLOUDFLARE_API_BASE_URL: process.env.CLOUDFLARE_API_BASE_URL,
CLOUDFLARE_ACCOUNT_ID: process.env.CLOUDFLARE_ACCOUNT_ID,
CLOUDFLARE_KV_NAMESPACE_ID: process.env.CLOUDFLARE_KV_NAMESPACE_ID,
CLOUDFLARE_API_TOKEN: process.env.CLOUDFLARE_API_TOKEN,
CLOUDFLARE_API_BASE_URL: process.env.CLOUDFLARE_API_BASE_URL,
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE: process.env.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE,
CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID: process.env.CLOUDFLARE_MNM_SUBDOMAIN_KV_NAMESPACE_ID,
MARQO_API_KEY: process.env.MARQO_API_KEY,
PROD_MARQO_API_BASE_URL: process.env.PROD_MARQO_API_BASE_URL,
DEV_MARQO_API_BASE_URL: process.env.DEV_MARQO_API_BASE_URL,
Expand Down

0 comments on commit 2b05602

Please sign in to comment.