-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.06 KB
/
pr-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
name: PR Build
# PR build
on:
pull_request:
branches: [ master, versionupgrade ]
workflow_dispatch:
# just runs Maven and Docker build
jobs:
build:
name: "PR build"
runs-on: [self-hosted, linux, X64]
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.2
- name: get version from pom.xml
run: |
echo "VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout )" >> $GITHUB_ENV
- name: Build with Maven
run: mvn clean -B package -P frontend --file pom.xml
env:
CI: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./dockerfile
push: false
tags: ${{ env.DOCKERHUB_ORG }}/databackend:${{ env.VERSION }}