-
Notifications
You must be signed in to change notification settings - Fork 16
38 lines (35 loc) · 1.04 KB
/
cd-metabase.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy Metabase
run-name: Deploy ${{ github.ref_name }} to Metabase ${{ inputs.environment || (github.event_name == 'release' && 'prod') || 'nonprod'}}
on:
workflow_dispatch:
inputs:
environment:
description: "target environment"
required: true
default: "dev"
type: choice
options:
- dev
- staging
- prod
image-tag:
description: "Metabase enterprise image tag to deploy"
required: true
type: string
jobs:
deploy:
name: Deploy
uses: ./.github/workflows/deploy-metabase.yml
strategy:
max-parallel: 1
fail-fast: false
matrix:
envs: ${{ github.event_name == 'release' && fromJSON('["prod"]') || github.ref_name == 'main' && fromJSON('["dev", "staging"]') || fromJSON('["dev"]') }}
with:
version: ${{ inputs.image-tag }}
environment: ${{ matrix.envs }}
send-slack-notification:
if: failure()
needs: [deploy]
uses: ./.github/workflows/send-slack-notification.yml
secrets: inherit