Skip to content

Commit

Permalink
Ensure all "cd" workflows have workflow_dispatch and we honor the env…
Browse files Browse the repository at this point in the history
…ironment if we're in that path
  • Loading branch information
mdragon committed Nov 22, 2024
1 parent 35fb5d6 commit c8da601
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/cd-analytics-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ jobs:
fail-fast: false
matrix:
directory: ["database", "service"]
<<<<<<< HEAD
envs: ${{ inputs.environment || github.event_name == 'release' && fromJSON('["prod"]') || github.ref_name == 'main' && fromJSON('["dev", "staging"]') || fromJSON('["dev"]') }}
=======
envs: ${{ fromJSON(inputs.environment != null && format('["{0}"]', inputs.environment) || github.event_name == 'release' && '["prod"]' || github.ref_name == 'main' && '["dev", "staging"]' || '["dev"]') }}
>>>>>>> 99b9921a (Ensure all "cd" workflows have workflow_dispatch and we honor the environment if we're in that path)

permissions:
contents: read
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cd-analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
<<<<<<< HEAD
envs: ${{ inputs.environment || github.event_name == 'release' && fromJSON('["prod"]') || github.ref_name == 'main' && fromJSON('["dev", "staging"]') || fromJSON('["dev"]') }}
=======
envs: ${{ fromJSON(inputs.environment != null && format('["{0}"]', inputs.environment) || github.event_name == 'release' && '["prod"]' || github.ref_name == 'main' && '["dev", "staging"]' || '["dev"]') }}
>>>>>>> 99b9921a (Ensure all "cd" workflows have workflow_dispatch and we honor the environment if we're in that path)
with:
app_name: "analytics"
environment: ${{ matrix.envs }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cd-api-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ jobs:
fail-fast: false
matrix:
directory: ["database", "service"]
<<<<<<< HEAD
envs: ${{ inputs.environment || github.event_name == 'release' && fromJSON('["prod"]') || github.ref_name == 'main' && fromJSON('["dev", "staging"]') || fromJSON('["dev"]') }}
=======
envs: ${{ fromJSON(inputs.environment != null && format('["{0}"]', inputs.environment) || github.event_name == 'release' && '["prod"]' || github.ref_name == 'main' && '["dev", "staging"]' || '["dev"]') }}
>>>>>>> 99b9921a (Ensure all "cd" workflows have workflow_dispatch and we honor the environment if we're in that path)

permissions:
contents: read
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cd-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
<<<<<<< HEAD
envs: ${{ inputs.environment || github.event_name == 'release' && fromJSON('["prod"]') || github.ref_name == 'main' && fromJSON('["dev", "staging"]') || fromJSON('["dev"]') }}
=======
envs: ${{ fromJSON(inputs.environment != null && format('["{0}"]', inputs.environment) || github.event_name == 'release' && '["prod"]' || github.ref_name == 'main' && '["dev", "staging"]' || '["dev"]') }}
>>>>>>> 99b9921a (Ensure all "cd" workflows have workflow_dispatch and we honor the environment if we're in that path)
with:
app_name: "api"
environment: ${{ matrix.envs }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cd-frontend-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ jobs:
fail-fast: false
matrix:
directory: ["service"]
<<<<<<< HEAD
envs: ${{ inputs.environment || github.event_name == 'release' && fromJSON('["prod"]') || github.ref_name == 'main' && fromJSON('["dev", "staging"]') || fromJSON('["dev"]') }}
=======
envs: ${{ fromJSON(inputs.environment != null && format('["{0}"]', inputs.environment) || github.event_name == 'release' && '["prod"]' || github.ref_name == 'main' && '["dev", "staging"]' || '["dev"]') }}
>>>>>>> 99b9921a (Ensure all "cd" workflows have workflow_dispatch and we honor the environment if we're in that path)

permissions:
contents: read
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cd-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
<<<<<<< HEAD
envs: ${{ inputs.environment || github.event_name == 'release' && fromJSON('["prod"]') || github.ref_name == 'main' && fromJSON('["dev", "staging"]') || fromJSON('["dev"]') }}
=======
envs: ${{ fromJSON(inputs.environment != null && format('["{0}"]', inputs.environment) || github.event_name == 'release' && '["prod"]' || github.ref_name == 'main' && '["dev", "staging"]' || '["dev"]') }}
>>>>>>> 99b9921a (Ensure all "cd" workflows have workflow_dispatch and we honor the environment if we're in that path)
with:
app_name: "frontend"
environment: ${{ matrix.envs }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd-metabase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
envs: ${{ inputs.environment || github.event_name == 'release' && fromJSON('["prod"]') || github.ref_name == 'main' && fromJSON('["dev", "staging"]') || fromJSON('["dev"]') }}
envs: ${{ fromJSON(format('["{0}"]', inputs.environment)) }}
with:
version: ${{ inputs.image-tag }}
environment: ${{ matrix.envs }}
Expand Down

0 comments on commit c8da601

Please sign in to comment.