-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (52 loc) · 1.3 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'
- 'CODEOWNERS'
- 'LICENSE'
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build:
name: Build
if: github.ref == 'refs/heads/main'
permissions:
contents: read
id-token: write
uses: navikt/familie-baks-gha-workflows/.github/workflows/build-maven-app.yaml@main
with:
build-image: true
push-image: true
skip-tests: true
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