@@ -46,25 +46,10 @@ jobs:
46
46
int_tests : true
47
47
secrets : inherit
48
48
49
- detect-user :
50
- name : Detect user team membership
51
- runs-on : ubuntu-latest
52
- outputs :
53
- IS_TEAM_MEMBER : ${{ steps.author.outputs.isTeamMember }}
54
- steps :
55
- - name : Get PR author
56
- if : github.event_name == 'pull_request'
57
- id : author
58
- uses : tspascoal/get-user-teams-membership@v2
59
- with :
60
- username : ${{ github.actor }}
61
- team : ' Vector'
62
- GITHUB_TOKEN : ${{ secrets.GH_PAT_ORG }}
63
-
64
49
integration-tests :
65
50
name : Integration Tests
66
51
runs-on : [linux, ubuntu-20.04-4core]
67
- needs : [ changes, detect-user]
52
+ needs : changes
68
53
if : always() && (
69
54
github.event_name == 'merge_group' || (
70
55
needs.changes.outputs.all-int == 'true'
@@ -110,6 +95,17 @@ jobs:
110
95
111
96
- run : docker image prune -af ; docker container prune -f
112
97
98
+ - name : Determine if secrets are defined (PR author is team member).
99
+ if : github.event_name == 'pull_request'
100
+ env :
101
+ GH_PAT_ORG : ${{ secrets.GH_PAT_ORG }}
102
+ run : |
103
+ if [[ "$GH_PAT_ORG" != "" ]] ; then
104
+ echo "PR_HAS_ACCESS_TO_SECRETS=true" >> "$GITHUB_ENV"
105
+ else
106
+ echo "PR_HAS_ACCESS_TO_SECRETS=false" >> "$GITHUB_ENV"
107
+ fi
108
+
113
109
- if : ${{ github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.amqp == 'true' }}
114
110
name : amqp
115
111
uses : nick-fields/retry@v2
@@ -119,7 +115,7 @@ jobs:
119
115
command : bash scripts/ci-integration-test.sh amqp
120
116
121
117
- if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.appsignal == 'true') &&
122
- (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
118
+ (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true')
123
119
name : appsignal
124
120
uses : nick-fields/retry@v2
125
121
with :
@@ -136,7 +132,7 @@ jobs:
136
132
command : bash scripts/ci-integration-test.sh aws
137
133
138
134
- if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.axiom == 'true') &&
139
- (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
135
+ (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true')
140
136
name : axiom
141
137
uses : nick-fields/retry@v2
142
138
with :
@@ -161,7 +157,7 @@ jobs:
161
157
command : bash scripts/ci-integration-test.sh clickhouse
162
158
163
159
- if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.databend == 'true') &&
164
- (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
160
+ (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true')
165
161
name : databend
166
162
uses : nick-fields/retry@v2
167
163
with :
@@ -170,7 +166,7 @@ jobs:
170
166
command : bash scripts/ci-integration-test.sh databend
171
167
172
168
- if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') &&
173
- (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
169
+ (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true')
174
170
name : datadog-agent
175
171
uses : nick-fields/retry@v2
176
172
with :
@@ -179,7 +175,7 @@ jobs:
179
175
command : bash scripts/ci-integration-test.sh datadog-agent
180
176
181
177
- if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') &&
182
- (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
178
+ (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true')
183
179
name : datadog-logs
184
180
uses : nick-fields/retry@v2
185
181
with :
@@ -188,7 +184,7 @@ jobs:
188
184
command : bash scripts/ci-integration-test.sh datadog-logs
189
185
190
186
- if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') &&
191
- (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
187
+ (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true')
192
188
name : datadog-metrics
193
189
uses : nick-fields/retry@v2
194
190
with :
@@ -197,7 +193,7 @@ jobs:
197
193
command : bash scripts/ci-integration-test.sh datadog-metrics
198
194
199
195
- if : (github.event_name == 'merge_group' || needs.changes.outputs.all-int == 'true' || needs.changes.outputs.datadog == 'true') &&
200
- (github.event_name != 'pull_request' || needs.detect-user.outputs.IS_TEAM_MEMBER == 'true')
196
+ (github.event_name != 'pull_request' || env.PR_HAS_ACCESS_TO_SECRETS == 'true')
201
197
name : datadog-traces
202
198
uses : nick-fields/retry@v2
203
199
with :
@@ -398,6 +394,7 @@ jobs:
398
394
runs-on : ubuntu-latest
399
395
if : always()
400
396
needs :
397
+ - changes
401
398
- integration-tests
402
399
env :
403
400
FAILED : ${{ contains(needs.*.result, 'failure') }}
0 commit comments