-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (43 loc) · 1.27 KB
/
naisdeploy.yaml
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
on:
workflow_call:
inputs:
VAR:
type: string
required: true
TELEMETRY:
type: string
required: true
environment:
type: string
required: true
secrets:
nais-deploy-secret:
required: true
github-token:
required: true
SLACK_WEBHOOK:
required: true
jobs:
deploy:
name: Deploy to ${{ inputs.environment }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy application to ${{ inputs.environment }}
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ inputs.environment }}-gcp
RESOURCE: .nais/nais-${{ inputs.environment }}.yaml
VAR: ${{ inputs.VAR }}
TELEMETRY: ${{ inputs.TELEMETRY }}
- name: Slack Notification (deploy failure)
if: failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: danger
SLACK_USERNAME: Github Actions
SLACK_ICON: https://github.com/github.png?size=48
SLACK_TITLE: 'aktivitet-arena-acl: deploy feilet!'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: 'Commit-message til feilende deploy: ${{ github.event.head_commit.message }}'