From 11d70d5796ff9f2c5708109047ac811bb30719aa Mon Sep 17 00:00:00 2001 From: Ru Chern Chong Date: Mon, 23 Dec 2024 21:24:30 +0800 Subject: [PATCH] Add missing environment secret in GHA workflow --- .github/workflows/sst.deploy.yml | 9 ++++++--- .github/workflows/sst.dev.yml | 5 ++--- .github/workflows/sst.prod.yml | 4 ++-- .github/workflows/sst.staging.yml | 6 +++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/sst.deploy.yml b/.github/workflows/sst.deploy.yml index 059c4f2..c0da3fd 100644 --- a/.github/workflows/sst.deploy.yml +++ b/.github/workflows/sst.deploy.yml @@ -4,16 +4,18 @@ on: workflow_call: inputs: environment: - description: 'GitHub environment name' + description: "GitHub environment name" required: true type: string sst-stage: - description: 'SST deployment stage' + description: "SST deployment stage" required: true type: string secrets: CLOUDFLARE_API_TOKEN: required: true + DATABASE_URL: + required: true MONGODB_URI: required: true SG_CARS_TRENDS_API_TOKEN: @@ -29,6 +31,7 @@ jobs: environment: ${{ inputs.environment }} env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + DATABASE_URL: ${{ secrets.DATABASE_URL }} MONGODB_URI: ${{ secrets.MONGODB_URI }} SG_CARS_TRENDS_API_TOKEN: ${{ secrets.SG_CARS_TRENDS_API_TOKEN }} UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }} @@ -51,7 +54,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: latest - cache: 'pnpm' + cache: "pnpm" - name: Install dependencies run: pnpm install - uses: aws-actions/configure-aws-credentials@v4 diff --git a/.github/workflows/sst.dev.yml b/.github/workflows/sst.dev.yml index 16c103d..ddda843 100644 --- a/.github/workflows/sst.dev.yml +++ b/.github/workflows/sst.dev.yml @@ -3,9 +3,8 @@ name: Deployment (Dev) on: push: branches-ignore: - - 'main' - - 'release/**' - + - "main" + - "release/**" permissions: id-token: write diff --git a/.github/workflows/sst.prod.yml b/.github/workflows/sst.prod.yml index 926cf3f..4cf5702 100644 --- a/.github/workflows/sst.prod.yml +++ b/.github/workflows/sst.prod.yml @@ -3,8 +3,8 @@ name: Deployment (Prod) on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - - 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' + - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" permissions: id-token: write diff --git a/.github/workflows/sst.staging.yml b/.github/workflows/sst.staging.yml index ff91b6b..b506226 100644 --- a/.github/workflows/sst.staging.yml +++ b/.github/workflows/sst.staging.yml @@ -3,10 +3,10 @@ name: Deployment (Staging) on: push: branches: - - 'main' - - 'release/**' + - "main" + - "release/**" tags-ignore: - - '*' + - "*" permissions: id-token: write