-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (53 loc) · 1.35 KB
/
main.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
45
46
47
48
49
50
51
52
53
54
# Full pipeline on push to main. Build, test, and deploy to dev + prod
name: Main
on:
workflow_dispatch:
push:
branches:
- 'main'
paths-ignore:
- '**.md'
- '**.MD'
- '.github/*.yaml'
- '.gitignore'
- '.prettierignore'
- '.prettierrc'
- 'CODEOWNERS'
- 'LICENSE'
- 'eslint.config.mjs'
- '.husky/**'
jobs:
build:
name: Build
if: github.ref == 'refs/heads/main' # Only deploy to prod from main branch
permissions:
contents: read
id-token: write
uses: navikt/familie-baks-gha-workflows/.github/workflows/build-yarn-app.yaml@main
with:
build-image: true
push-image: true
base-path: /barnetrygd/soknad/
secrets: inherit
deploy-dev:
name: Deploy dev
permissions:
id-token: write
needs: [ build ]
uses: navikt/familie-baks-gha-workflows/.github/workflows/deploy.yaml@main
with:
image: ${{ needs.build.outputs.image }}
cluster: dev-gcp
resource: .nais/app-dev.yaml
secrets: inherit
deploy-prod:
name: Deploy prod
permissions:
id-token: write
needs: [ build, deploy-dev ]
uses: navikt/familie-baks-gha-workflows/.github/workflows/deploy.yaml@main
with:
image: ${{ needs.build.outputs.image }}
cluster: prod-gcp
resource: .nais/app-prod.yaml
secrets: inherit