-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (42 loc) · 1.41 KB
/
build_deploy_gcp_prod.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
47
48
49
# Denne filen vil erstatte build_prod, build_deploy_mock, etc.
name: "Build and deploy to prod-gcp"
on:
push:
branches:
- "master"
jobs:
deploy-gcp:
strategy:
matrix:
include:
- environment: prod
cluster: prod-gcp
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Build and push docker image to GAR
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: teamdigisos
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
image_suffix: ${{ matrix.environment }}
build_args: |
DIGISOS_ENV=${{ matrix.environment }}
LOGIN_SESSION_API_URL="https://www.nav.no/sosialhjelp/soknad/oauth2/session"
LOGOUT_URL="https://www.nav.no/sosialhjelp/soknad/oauth2/logout"
build_secrets: |
NODE_AUTH_TOKEN=${{ secrets.READER_TOKEN }}
- name: "Deploy to ${{ matrix.environment }}"
uses: nais/deploy/actions/deploy@v2
env:
RESOURCE: .nais/app.yaml
CLUSTER: ${{ matrix.cluster }}
REF: ${{ github.sha }}
PRINT_PAYLOAD: true
IMAGE: ${{ steps.docker-build-push.outputs.image }}
VARS: .nais/vars/${{ matrix.environment }}.yaml