-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (49 loc) · 1.51 KB
/
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
name: Build & deploy
on: [ push, workflow_dispatch ]
permissions:
contents: read
id-token: write
jobs:
call-build-java-gradlew:
uses: navikt/toi-github-actions-workflows/.github/workflows/build-java-gradlew.yaml@main
with:
java-version: '21'
permissions:
contents: read
id-token: write
secrets: inherit
deploy-to-dev:
name: Deploy to dev
needs: call-build-java-gradlew
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/oppgrader-avhengigheter'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-fss
VAR: version=${{ needs.call-build-java-gradlew.outputs.image }}
RESOURCE: nais/nais-dev.yaml
deploy-to-prod:
name: Deploy to prod
needs:
- deploy-to-dev
- call-build-java-gradlew
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-fss
VAR: version=${{ needs.call-build-java-gradlew.outputs.image }}
RESOURCE: nais/nais-prod.yaml,nais/alerts.yml
call-trivy-security-scan:
needs: call-build-java-gradlew
uses: navikt/toi-github-actions-workflows/.github/workflows/trivy-security-scan.yaml@main
with:
image: ${{ needs.call-build-java-gradlew.outputs.image }}
permissions:
id-token: write
security-events: write
secrets: inherit