File tree Expand file tree Collapse file tree 3 files changed +13
-53
lines changed Expand file tree Collapse file tree 3 files changed +13
-53
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ name: Build flow
2
2
3
3
on : [workflow_call]
4
4
5
+ permissions :
6
+ actions : read
7
+ checks : write
8
+
5
9
jobs :
6
10
build :
7
11
runs-on : ubuntu-latest
30
34
with :
31
35
name : test-artifact
32
36
path : |
33
- **/build/test-results/**
37
+ **/build/test-results/**
38
+ - name : Test Report
39
+ uses : dorny/test-reporter@v1
40
+ if : success() || failure()
41
+ with :
42
+ artifact : test-artifact
43
+ name : Junit Test
44
+ path : ./**/TEST-*.xml
45
+ reporter : java-junit
Original file line number Diff line number Diff line change 7
7
8
8
permissions :
9
9
packages : write
10
- actions : read
11
- checks : write
12
10
13
11
jobs :
14
12
build :
30
28
name : build-artifact
31
29
- name : Quality gate
32
30
run : ./gradlew sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }} -Dsonar.gradle.skipCompile=true -Dsonar.host.url=https://sonarcloud.io
33
- snapshot :
34
- runs-on : ubuntu-latest
35
- needs : build
36
- steps :
37
- - uses : actions/checkout@v4
38
- - name : Configure Java version
39
- uses : actions/setup-java@v4
40
- with :
41
- java-version : ' 21'
42
- distribution : ' temurin'
43
- architecture : x64
44
- - name : Download build artifact
45
- uses : actions/download-artifact@v4
46
- with :
47
- name : build-artifact
48
- - name : Publish artifacts
49
- run : |
50
- echo "Github ref: ${GITHUB_REF}"
51
- NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
52
- echo "Github username: ${GITHUB_ACTOR}"
53
- ./gradlew -Pversion=1.0.0-SNAPSHOT publish -x check
54
- env :
55
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56
- test-report :
57
- runs-on : ubuntu-latest
58
- needs : build
59
- steps :
60
- - uses : actions/checkout@v4
61
- - name : test-report
62
- uses : dorny/test-reporter@v1
63
- if : success() || failure()
64
- with :
65
- artifact : test-artifact
66
- name : Junit Test
67
- path : ./**/TEST-*.xml
68
- reporter : java-junit
69
-
70
31
Original file line number Diff line number Diff line change @@ -12,19 +12,6 @@ permissions:
12
12
jobs :
13
13
build :
14
14
uses : ./.github/workflows/component-build.yml
15
- test-report :
16
- runs-on : ubuntu-latest
17
- needs : build
18
- steps :
19
- - uses : actions/checkout@v4
20
- - name : test-report
21
- uses : dorny/test-reporter@v1
22
- if : success() || failure()
23
- with :
24
- artifact : test-artifact
25
- name : Junit Test
26
- path : ./**/TEST-*.xml
27
- reporter : java-junit
28
15
code-quality :
29
16
runs-on : ubuntu-latest
30
17
needs : build
You can’t perform that action at this time.
0 commit comments