Skip to content

Deploy kai/analytics-libc to Analytics staging #93

Deploy kai/analytics-libc to Analytics staging

Deploy kai/analytics-libc to Analytics staging #93

Workflow file for this run

name: Deploy Analytics
run-name: Deploy ${{ github.ref_name }} to Analytics ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'nonprod'}}
on:
push:
branches:
- "main"
paths:
- "analytics/**"
release:
types: [published]
workflow_dispatch:
inputs:
environment:
description: "target environment"
required: true
default: "dev"
type: choice
options:
- dev
- staging
- prod
jobs:
analytics-checks:
name: Run Analytics Checks
uses: ./.github/workflows/ci-analytics.yml
secrets: inherit
vulnerability-scans:
name: Vulnerability Scans
uses: ./.github/workflows/vulnerability-scans.yml
with:
app_name: analytics
deploy:
name: Deploy
needs: [analytics-checks, vulnerability-scans]
uses: ./.github/workflows/deploy.yml
strategy:
max-parallel: 1
fail-fast: false
matrix:
envs: ${{ fromJSON(inputs.environment != null && format('["{0}"]', inputs.environment) || github.event_name == 'release' && '["prod"]' || github.ref_name == 'main' && '["dev", "staging"]' || '["dev"]') }}
with:
app_name: "analytics"
environment: ${{ matrix.envs }}
send-slack-notification:
if: failure()
needs: [analytics-checks, vulnerability-scans, deploy]
uses: ./.github/workflows/send-slack-notification.yml
secrets: inherit