55
55
steps :
56
56
- name : Check out repository
57
57
uses : actions/checkout@v4
58
+ with :
59
+ ref : ${{ github.ref }}
58
60
59
61
- name : Run tests
60
62
uses : ./.github/actions/test
@@ -67,14 +69,14 @@ jobs:
67
69
name : Report coverage
68
70
needs : test
69
71
runs-on : ubuntu-latest
70
- env :
71
- from_fork : ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
72
+ if : ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
72
73
73
74
steps :
74
75
- name : Check out repository
75
76
uses : actions/checkout@v4
76
77
with :
77
78
fetch-depth : 0
79
+ ref : ${{ github.ref }}
78
80
79
81
- name : Setup
80
82
uses : ./.github/actions/setup
@@ -93,13 +95,11 @@ jobs:
93
95
run : poetry run coverage combine coverage-*/.coverage
94
96
95
97
- name : Generate coverage report
96
- if : ${{ env.from_fork != 'true' }}
97
98
run : |
98
99
poetry run coverage xml -i
99
100
sed -i "s/home\/runner\/work\/rate-control\/rate-control/github\/workspace/g" coverage.xml
100
101
101
102
- name : Report to SonarCloud
102
- if : ${{ env.from_fork != 'true' }}
103
103
uses : sonarsource/sonarcloud-github-action@v2
104
104
env :
105
105
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
@@ -114,6 +114,7 @@ jobs:
114
114
steps :
115
115
- name : Check out repository
116
116
uses : actions/checkout@v4
117
+ ref : ${{ github.ref }}
117
118
118
119
- name : Setup
119
120
uses : ./.github/actions/setup
@@ -141,6 +142,7 @@ jobs:
141
142
uses : actions/checkout@v4
142
143
with :
143
144
token : ${{ secrets.PAT }}
145
+ ref : ${{ github.ref }}
144
146
145
147
- name : Setup
146
148
uses : ./.github/actions/setup
0 commit comments