-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.69 KB
/
build.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
# Generert av github-actions-templates, bør ikke endres manuelt
name: Maven Build and deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: digipost/[email protected]
with:
timezoneLinux: "Europe/Oslo"
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: true
- name: Set REVISION environment variable
uses: digipost/[email protected]
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version-file: '.java-version'
server-id: github
cache: 'maven'
- name: Set release version
run: mvn --settings .mvn/settings.xml versions:set --no-transfer-progress -DnewVersion=$REVISION
- name: Set MVN_GOALS environment variable
uses: digipost/[email protected]
with:
deploy-to-ACR: true
deploy-to-GPR: false
- name: Build, test and publish to GPR and ACR
run: |
mvn $MVN_GOALS --settings .mvn/settings.xml --no-transfer-progress --show-version --batch-mode --strict-checksums
env:
AZURECR_USERNAME: ${{ secrets.AZURE_CONTAINER_REGISTRY_USERNAME }}
AZURECR_PASSWORD: ${{ secrets.AZURE_CONTAINER_REGISTRY_PASSWORD }}
GITHUB_ACTOR: ${{ secrets.DIGIPOST_BOT_USERNAME }}
GITHUB_TOKEN: ${{ secrets.DIGIPOST_LES_PACKAGE_TOKEN }}
DPOST_HOME: /tmp
- name: Archive production artifacts
uses: actions/upload-artifact@v3
if: failure()
with:
name: Upload for feilet bygg
path: |
target/testgenerertepdf/*.pdf
target/*_diff.pdf