File tree 2 files changed +13
-29
lines changed
2 files changed +13
-29
lines changed Original file line number Diff line number Diff line change 19
19
if : github.event.workflow_run.head_repository.owner.login != 'dnsjava'
20
20
runs-on : ubuntu-latest
21
21
steps :
22
- - name : echo
23
- run : |
24
- cat << EOF
25
- ${{ toJson(github) }}
26
- EOF
27
-
28
22
- name : Download PR number artifact
29
23
id : get_pr_number
30
24
uses : dawidd6/action-download-artifact@v2
35
29
36
30
- name : Read Pull Request Number
37
31
id : pr_number
38
- shell : bash
39
32
run : |
40
33
PR=$(cat pr_number.txt)
41
34
echo "pr_number=${PR}" >> "$GITHUB_OUTPUT"
51
44
full_name : ${{ github.event.repository.full_name }}
52
45
number : ${{ steps.pr_number.outputs.pr_number }}
53
46
54
- - name : Checkout base
55
- uses : actions/checkout@v3
56
- with :
57
- repository : ${{ github.event.repository.full_name }}
58
- ref : ${{ fromJson(steps.get_pr_data.outputs.data).base.ref }}
59
- path : base
60
-
61
47
- name : Checkout PR
62
48
uses : actions/checkout@v3
63
49
with :
@@ -66,20 +52,24 @@ jobs:
66
52
# for Sonar
67
53
fetch-depth : 0
68
54
69
- - name : Get analysis data
70
- uses : ./base/.github/actions/prepare-analysis
55
+ - name : Make sure 'base' doesn't exist
56
+ shell : bash
57
+ run : rm -rf base
71
58
72
- - name : Set up JDK
73
- uses : actions/setup-java @v3
59
+ - name : Checkout base
60
+ uses : actions/checkout @v3
74
61
with :
75
- java-version : ${{ env.BUILD_JAVA_VERSION }}
76
- distribution : temurin
62
+ repository : ${{ github.event.repository.full_name }}
63
+ ref : ${{ fromJson(steps.get_pr_data.outputs.data).base.ref }}
64
+ path : base
65
+
66
+ - name : Get analysis data
67
+ uses : ./base/.github/actions/prepare-analysis
77
68
78
69
- name : Run SonarQube
79
70
env :
80
71
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81
72
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
82
- shell : bash
83
73
run : |
84
74
cp -f base/pom.xml .
85
75
mvn -B \
Original file line number Diff line number Diff line change 80
80
runs-on : ubuntu-latest
81
81
needs : build
82
82
steps :
83
- - name : echo
84
- run : |
85
- cat << EOF
86
- ${{ toJson(github) }}
87
- EOF
88
-
89
83
- name : Checkout
90
84
uses : actions/checkout@v3
91
85
@@ -118,11 +112,11 @@ jobs:
118
112
target/jacoco.exec
119
113
120
114
- name : Save PR number to file
121
- if : github.event_name == 'pull_request'
115
+ if : github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != 'dnsjava'
122
116
run : echo ${{ github.event.number }} > pr_number.txt
123
117
124
118
- name : Archive PR number
125
- if : github.event_name == 'pull_request'
119
+ if : github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != 'dnsjava'
126
120
uses : actions/upload-artifact@v3
127
121
with :
128
122
name : pr_number
You can’t perform that action at this time.
0 commit comments