-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.89 KB
/
ung-sak-web-build-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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build and deploy ung-sak-web
on:
push:
paths-ignore:
- '**.md'
- '.gitignore'
- 'CODEOWNERS'
branches:
- dev-ung
jobs:
build-deploy:
name: Build and deploy Docker image
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
CLUSTER: dev-gcp
steps:
- name: Hente kode
uses: actions/checkout@v4
- name: Setup + Install
uses: ./.github/actions/setup-install
with:
npmAuthToken: ${{ secrets.READER_TOKEN }}
- name: Bygge dist
run: yarn build:ung
- name: Opprett release med Sentry
run: yarn sentry-release-ung
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Build and push to docker registry
uses: navikt/sif-gha-workflows/.github/actions/maven/build-push-docker-image@main
id: docker-push
with:
image_base_name: 'ung-sak-web'
additional-tag: 'latest' # For å få latest sjølv om vi ikkje ruller ut frå master branch endå. Fjernast når utrulling skal skje frå master.
without_navikt_prefix: true
#Konfigurerer for bygging av ung docker image:
build-args: |
featureToggles=ung.feature-toggles.json
proxyConfig=ung.proxy.nginx
appVariant=ung
port=9005
labels: |
org.opencontainers.image.title=ung-sak-web
org.opencontainers.image.description=Frontend for ung-sak
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
push-image: true
- name: Deploy to nais
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: ${{ env.CLUSTER }}
RESOURCE: deploy/ung/${{ env.CLUSTER }}.yml
VAR: image=${{ steps.docker-push.outputs.image }}