-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (39 loc) · 1.11 KB
/
apply-alerts.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
# This workflow trigger on push to any branch.
name: Alerts
on:
push:
paths:
- 'nais/alerterator-*'
- 'nais/dev-gcp.json'
- 'nais/prod-gcp.json'
- '.github/workflows/apply-alerts.yml'
branches:
- 'master'
- 'dev-**'
jobs:
deploy-dev-gcp:
name: Deploy to dev-gcp
if: startsWith(github.ref, 'refs/heads/dev-') || startsWith(github.ref, 'refs/heads/master') # Deploy if branch is either master or dev-*
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: nais/alerterator-dev.yml
VARS: nais/dev-gcp.json
deploy-prod-gcp:
name: Deploy to prod-gcp
if: startsWith(github.ref, 'refs/heads/master') # If the branch is master
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-gcp
RESOURCE: nais/alerterator-prod.yml
VARS: nais/prod-gcp.json