-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (49 loc) · 1.61 KB
/
build-master-deploy-dev-gcp.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
55
56
name: Build master & deploy to dev-gcp
on:
workflow_dispatch:
env:
IMAGE_BASE: ghcr.io/${{ github.repository }}
jobs:
Build:
runs-on: ubuntu-latest
permissions:
contents: write # dep submissions
id-token: write # nais docker-build-push
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: maven
- name: Bygge JAR
run: mvn clean package --settings ./.m2/settings.xml
env:
GITHUB_PASSWORD: ${{ secrets.READER_TOKEN }}
- uses: nais/docker-build-push@v0
id: docker-push
with:
team: k9saksbehandling
push_image: true
tag: latest
pull: true
dockerfile: Dockerfile
docker_context: .
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
- name: Deploy til preprod
uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: nais/dev-gcp.yml
IMAGE: ${{ steps.docker-push.outputs.image }}
- name: Maven Dependency Tree Dependency Submission
uses: advanced-security/[email protected] # feil i 4.0.1
with:
settings-file: ./.m2/settings.xml
ignore-maven-wrapper: true
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PASSWORD: ${{ secrets.READER_TOKEN }}