Deploy alerts for Maskinporten Guardian to test and prod #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy alerts | |
run-name: Deploy alerts for Maskinporten Guardian to test and prod | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- '.nais/alerts.yaml' | |
- '.github/workflows/alert-deploy.yml' | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
jobs: | |
test-deploy: | |
name: Deploy alerts to test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Deploy to test | |
uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: test | |
RESOURCE: .nais/alerts.yaml | |
DEPLOY_SERVER: deploy.ssb.cloud.nais.io:443 | |
- name: Deploy AlertManagerConfig | |
uses: statisticsnorway/[email protected] | |
with: | |
cluster: "test" | |
prod-deploy: | |
name: Deploy alerts to prod | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Deploy to prod | |
uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: prod | |
RESOURCE: .nais/alerts.yaml | |
DEPLOY_SERVER: deploy.ssb.cloud.nais.io:443 | |
- name: Deploy AlertManagerConfig | |
uses: statisticsnorway/[email protected] | |
with: | |
cluster: "prod" |