-
Notifications
You must be signed in to change notification settings - Fork 13
52 lines (46 loc) · 1.39 KB
/
api-gateway.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
name: api-gateway
on:
push:
paths:
- "api-gateway/**"
branches: [main]
pull_request:
paths:
- "api-gateway/**"
types:
- opened
- synchronize
- reopened
jobs:
build:
name: Run Unit & Integration Tests with jdk ${{ matrix.java }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: "api-gateway"
strategy:
matrix:
java: ["21"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: graalvm/setup-graalvm@v1
with:
distribution: 'graalvm'
java-version: ${{ matrix.java }}
cache: "maven"
- name: Printing versions
run: |
echo "GRAALVM_HOME: $GRAALVM_HOME"
echo "JAVA_HOME: $JAVA_HOME"
java --version
native-image --version
- name: Build and analyze
run: ./mvnw clean verify
- if: ${{ github.ref == 'refs/heads/main' }}
name: Build Image and push to docker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
DOCKER_PASSCODE: ${{secrets.DOCKER_PASSCODE}}
run: ./mvnw spring-boot:build-image -DskipTests -DCI_DOCKER_PASSWORD=${DOCKER_PASSCODE} -DCI_DOCKER_USERNAME=dockertmt -Dspring-boot.build-image.publish=true