-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (43 loc) · 1.18 KB
/
manual-alert-deploy.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
39
40
41
42
43
44
45
46
name: Manually triggered deployment (alerts)
run-name: Manual ${{ github.event.inputs.environment }} deploy of branch ${{ github.head_ref || github.ref_name }}
permissions:
contents: "read"
id-token: "write"
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy'
required: true
default: 'preprod'
type: choice
options:
- preprod
- prod
jobs:
dev-deploy:
if: github.event.inputs.environment == 'preprod'
name: Deploy to dev
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy to dev
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: .nais/alerts.yml
VARS: .nais/preprod-alert.json
prod-deploy:
if: github.event.inputs.environment == 'prod'
name: Deploy to prod
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy to dev
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-gcp
RESOURCE: .nais/alerts.yml
VARS: .nais/prod-alert.json