forked from epam/ai-dial-ci
-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (86 loc) · 2.69 KB
/
java_pr.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Java PR workflow
on:
workflow_call:
inputs:
bypass_checks:
type: boolean
default: false
description: Do not fail pipeline if checks failed
enable_style_checks:
type: boolean
default: true
description: Enable style_checks
bypass_style_checks:
type: boolean
default: false
description: Do not fail pipeline if style_checks failed
enable_code_checks:
type: boolean
default: true
description: Enable code_checks
bypass_code_checks:
type: boolean
default: false
description: Do not fail pipeline if code_checks failed
enable_ort:
type: boolean
default: true
description: Enable ORT scanning
bypass_ort:
type: boolean
default: false
description: Do not fail pipeline if ORT scan failed
enable_trivy:
type: boolean
default: true
description: Enable Trivy scanning
bypass_trivy:
type: boolean
default: false
description: Do not fail pipeline if Trivy failed
java_version:
type: string
default: "17"
description: Java version to use
java_distribution:
type: string
default: "temurin"
description: Java distribution to use
env:
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
uses: ./.github/workflows/java_test.yml
with:
bypass_checks: ${{ inputs.bypass_checks }}
enable_style_checks: ${{ inputs.enable_style_checks }}
bypass_style_checks: ${{ inputs.bypass_style_checks }}
enable_code_checks: ${{ inputs.enable_code_checks }}
bypass_code_checks: ${{ inputs.bypass_code_checks }}
enable_ort: ${{ inputs.enable_ort }}
bypass_ort: ${{ inputs.bypass_ort }}
java_version: ${{ inputs.java_version }}
java_distribution: ${{ inputs.java_distribution }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: alexey-ban/ai-dial-ci/actions/java_prepare@main
with:
java_version: ${{ inputs.java_version }}
java_distribution: ${{ inputs.java_distribution }}
- run: ./gradlew build -x test
docker_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
lfs: true
- uses: alexey-ban/ai-dial-ci/actions/build_docker@main
with:
image_name: ghcr.io/${{ env.IMAGE_NAME }}
image_tag: test
scan: ${{ inputs.enable_trivy }}
bypass_checks: ${{ inputs.bypass_trivy }}