From 8cfe08e91be9d4aabada0ef135409d7016b8b635 Mon Sep 17 00:00:00 2001 From: Alsia Plybeah Date: Wed, 24 Apr 2024 10:37:38 -0400 Subject: [PATCH 1/2] add staging env input --- .github/workflows/cd-api.yml | 1 + .github/workflows/cd-frontend.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/cd-api.yml b/.github/workflows/cd-api.yml index 8cbc2c2f3..a444f980e 100644 --- a/.github/workflows/cd-api.yml +++ b/.github/workflows/cd-api.yml @@ -20,6 +20,7 @@ on: type: choice options: - dev + - staging - prod jobs: diff --git a/.github/workflows/cd-frontend.yml b/.github/workflows/cd-frontend.yml index 5fb443045..058d97668 100644 --- a/.github/workflows/cd-frontend.yml +++ b/.github/workflows/cd-frontend.yml @@ -20,6 +20,7 @@ on: type: choice options: - dev + - staging - prod jobs: From 39461d07d6f098fc5da9816697bd141a4214559d Mon Sep 17 00:00:00 2001 From: Alsia Plybeah Date: Mon, 29 Apr 2024 11:11:11 -0400 Subject: [PATCH 2/2] update env logic --- .github/workflows/cd-analytics.yml | 4 ++-- .github/workflows/cd-api.yml | 4 ++-- .github/workflows/cd-frontend.yml | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cd-analytics.yml b/.github/workflows/cd-analytics.yml index c06a391c1..f7ebe8d95 100644 --- a/.github/workflows/cd-analytics.yml +++ b/.github/workflows/cd-analytics.yml @@ -1,7 +1,7 @@ name: Deploy Analytics # Need to set a default value for when the workflow is triggered from a git push # which bypasses the default configuration for inputs -run-name: Deploy ${{ github.ref_name }} to Analytics ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }} +run-name: Deploy ${{ github.ref_name }} to Analytics ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]')}} on: push: @@ -35,4 +35,4 @@ jobs: uses: ./.github/workflows/deploy.yml with: app_name: "analytics" - environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }} + environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }} diff --git a/.github/workflows/cd-api.yml b/.github/workflows/cd-api.yml index a444f980e..cc15b7383 100644 --- a/.github/workflows/cd-api.yml +++ b/.github/workflows/cd-api.yml @@ -1,7 +1,7 @@ name: Deploy API # Need to set a default value for when the workflow is triggered from a git push # which bypasses the default configuration for inputs -run-name: Deploy ${{ github.ref_name }} to API ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }} +run-name: Deploy ${{ github.ref_name }} to API ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }} on: push: @@ -34,4 +34,4 @@ jobs: uses: ./.github/workflows/deploy.yml with: app_name: "api" - environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }} + environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }} diff --git a/.github/workflows/cd-frontend.yml b/.github/workflows/cd-frontend.yml index 058d97668..a9b3aed28 100644 --- a/.github/workflows/cd-frontend.yml +++ b/.github/workflows/cd-frontend.yml @@ -1,8 +1,7 @@ name: Deploy Frontend # Need to set a default value for when the workflow is triggered from a git push # which bypasses the default configuration for inputs -run-name: Deploy ${{ github.ref_name }} to Frontend ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }} - +run-name: Deploy ${{ github.ref_name }} to Frontend ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }} on: push: branches: @@ -34,4 +33,4 @@ jobs: uses: ./.github/workflows/deploy.yml with: app_name: "frontend" - environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'dev' }} + environment: ${{ inputs.environment || (github.event_name == 'release' && 'prod') || fromJSON('["dev", "staging"]') }}