Skip to content

Commit

Permalink
update env logic
Browse files Browse the repository at this point in the history
  • Loading branch information
aplybeah committed Apr 29, 2024
1 parent 8cfe08e commit 39461d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd-analytics.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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"]') }}
4 changes: 2 additions & 2 deletions .github/workflows/cd-api.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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"]') }}
5 changes: 2 additions & 3 deletions .github/workflows/cd-frontend.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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"]') }}

0 comments on commit 39461d0

Please sign in to comment.