Skip to content

Commit

Permalink
adds some missing vars
Browse files Browse the repository at this point in the history
  • Loading branch information
coilysiren committed Jan 9, 2025
1 parent 46e7dae commit e4588b2
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/cd-analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
- dev
- staging
- prod
version:
required: true
default: "main"
description: Tag or branch or SHA to deploy

jobs:
analytics-checks:
Expand All @@ -46,6 +50,7 @@ jobs:
with:
app_name: "analytics"
environment: ${{ matrix.envs }}
version: ${{ inputs.version || 'main' }}

send-slack-notification:
if: failure()
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cd-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
- dev
- staging
- prod
version:
required: true
default: "main"
description: Tag or branch or SHA to deploy

jobs:
api-checks:
Expand All @@ -47,6 +51,7 @@ jobs:
with:
app_name: "api"
environment: ${{ matrix.envs }}
version: ${{ inputs.version || 'main' }}

send-slack-notification:
if: failure()
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cd-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
- dev
- staging
- prod
version:
required: true
default: "main"
description: Tag or branch or SHA to deploy

jobs:
frontend-checks:
Expand All @@ -45,6 +49,7 @@ jobs:
with:
app_name: "frontend"
environment: ${{ matrix.envs }}
version: ${{ inputs.version || 'main' }}

send-slack-notification:
if: failure()
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cd-metabase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
matrix:
envs: ${{ fromJSON(format('["{0}"]', inputs.environment)) }}
with:
app_name: "metabase"
version: ${{ inputs.image-tag }}
environment: ${{ matrix.envs }}

Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/deploy-metabase.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Chained Deploy
run-name: Chained Deploy Layer for ${{ github.ref_name }} to Metabase ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'nonprod' }}
name: Deploy

on:
workflow_call:
inputs:
app_name:
description: "name of application folder under infra directory"
required: true
type: string
environment:
description: "the name of the application environment (e.g. dev, staging, prod)"
required: true
Expand All @@ -13,7 +16,7 @@ on:
required: true
type: string

concurrency: cd-${{ inputs.environment }}
concurrency: cd-${{inputs.app_name}}-${{ inputs.environment }}

jobs:
deploy:
Expand All @@ -24,16 +27,15 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.7
terraform_wrapper: false

- name: Set up Terraform
uses: ./.github/actions/setup-terraform

- name: Configure AWS credentials
uses: ./.github/actions/configure-aws-credentials
with:
app_name: analytics
app_name: metabase
environment: ${{ inputs.environment }}

- name: Deploy metabase
run: make metabase-deploy APP_NAME=metabase ENVIRONMENT=${{ inputs.environment }} IMAGE_TAG=${{ inputs.version }}
run: make metabase-deploy APP_NAME=${{ inputs.app_name }} ENVIRONMENT=${{ inputs.environment }} IMAGE_TAG=${{ inputs.version }}

0 comments on commit e4588b2

Please sign in to comment.