-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.62 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: PR Build
# PR build
on:
pull_request:
branches: [ main, 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 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.2
- uses: s4u/[email protected]
with:
repositories: |
[{
"id": "visionapi",
"name": "vision-api",
"url": "https://maven.pkg.github.com/starwit/vision-api",
"snapshots": {"enabled": true}
},{
"id": "visionlib",
"name": "vision-lib",
"url": "https://maven.pkg.github.com/starwit/vision-lib",
"snapshots": {"enabled": true}
}]
servers: |
[{
"id": "visionapi",
"username": "flonix8",
"password": "${{ secrets.VISION_MAVEN_READ_TOKEN }}"
},{
"id": "visionlib",
"username": "flonix8",
"password": "${{ secrets.VISION_MAVEN_READ_TOKEN }}"
}]
- 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 --file pom.xml
env:
CI: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3