Skip to content

Commit

Permalink
Merge pull request #45 from kotalco/fix/copying-env-files
Browse files Browse the repository at this point in the history
fix secrets envsubst redirection
  • Loading branch information
mabdulmoghni authored Apr 16, 2024
2 parents a1fa6a4 + 48cee47 commit 86d8d04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pr-cloud-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2

- name: update managed-dashboard with secrets values - staging
env:
NEXT_PUBLIC_WS_API_URL: "${{ secrets.STAGING_NEXT_PUBLIC_WS_API_URL }}"
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: "${{ secrets.STAGING_NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY }}"
API_URL: "${{ secrets.STAGING_API_URL }}"
run: |
envsubst < ./.env.production | tee .env.production
envsubst < .env.production > .env.production.tmp
mv .env.production.tmp .env.production
# - name: Install pnpm
# uses: pnpm/action-setup@v2
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/publish-cloud-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2

- name: update managed-dashboard with secrets values - staging
if: github.ref == 'refs/heads/staging'
Expand All @@ -24,7 +24,8 @@ jobs:
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: "${{ secrets.STAGING_NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY }}"
API_URL: "${{ secrets.STAGING_API_URL }}"
run: |
envsubst < ./.env.production | tee .env.production
envsubst < .env.production > .env.production.tmp
mv .env.production.tmp .env.production
- name: update managed-dashboard with secrets values - production
if: github.ref == 'refs/heads/main'
Expand All @@ -33,7 +34,8 @@ jobs:
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: "${{ secrets.PROD_NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY }}"
API_URL: "${{ secrets.PROD_API_URL }}"
run: |
envsubst < ./.env.production | tee .env.production
envsubst < .env.production > .env.production.tmp
mv .env.production.tmp .env.production
# - name: Install pnpm
# uses: pnpm/action-setup@v2
Expand Down

0 comments on commit 86d8d04

Please sign in to comment.