8
8
tags :
9
9
- " *"
10
10
11
+ # This is required so CI can run on forked repositories too!
12
+ pull_request_target :
13
+ branches :
14
+ - " *"
15
+
11
16
pull_request :
12
17
branches :
13
18
- " *"
@@ -178,7 +183,7 @@ jobs:
178
183
-timeout=3m -count=$GOCOUNT -short -failfast
179
184
180
185
- name : Upload DataDog Trace
181
- if : (success() || failure()) && github.actor != 'dependabot[bot]'
186
+ if : (success() || failure()) && github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
182
187
env :
183
188
DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
184
189
DD_DATABASE : fake
@@ -187,7 +192,7 @@ jobs:
187
192
run : go run scripts/datadog-cireport/main.go gotests.xml
188
193
189
194
- uses : codecov/codecov-action@v2
190
- if : github.actor != 'dependabot[bot]'
195
+ if : github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
191
196
with :
192
197
token : ${{ secrets.CODECOV_TOKEN }}
193
198
files : ./gotests.coverage
@@ -264,25 +269,25 @@ jobs:
264
269
-count=1 -parallel=2 -race -failfast
265
270
266
271
- name : Upload DataDog Trace
267
- if : (success() || failure()) && github.actor != 'dependabot[bot]'
272
+ if : (success() || failure()) && github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
268
273
env :
269
274
DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
270
275
DD_DATABASE : postgresql
271
276
GIT_COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
272
277
run : go run scripts/datadog-cireport/main.go gotests.xml
273
278
274
279
- uses : codecov/codecov-action@v2
275
- if : github.actor != 'dependabot[bot]'
280
+ if : github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
276
281
with :
277
282
token : ${{ secrets.CODECOV_TOKEN }}
278
283
files : ./gotests.coverage
279
284
flags : unittest-go-${{ matrix.os }}
280
- fail_ci_if_error : true
285
+ fail_ci_if_error : ${{ github.repository_owner == 'coder' }}
281
286
282
287
deploy :
283
288
name : " deploy"
284
289
runs-on : ubuntu-latest
285
- if : github.ref == 'refs/heads/main'
290
+ if : github.ref == 'refs/heads/main' && github.repository_owner == 'coder'
286
291
permissions :
287
292
contents : read
288
293
id-token : write
@@ -391,15 +396,15 @@ jobs:
391
396
working-directory : site
392
397
393
398
- uses : codecov/codecov-action@v2
394
- if : github.actor != 'dependabot[bot]'
399
+ if : github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
395
400
with :
396
401
token : ${{ secrets.CODECOV_TOKEN }}
397
402
files : ./site/coverage/lcov.info
398
403
flags : unittest-js
399
404
fail_ci_if_error : true
400
405
401
406
- name : Upload DataDog Trace
402
- if : (success() || failure()) && github.actor != 'dependabot[bot]'
407
+ if : (success() || failure()) && github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
403
408
env :
404
409
DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
405
410
DD_CATEGORY : unit
@@ -483,7 +488,7 @@ jobs:
483
488
working-directory : site
484
489
485
490
- name : Upload DataDog Trace
486
- if : (success() || failure()) && github.actor != 'dependabot[bot]' && runner.os == 'Linux'
491
+ if : (success() || failure()) && github.actor != 'dependabot[bot]' && runner.os == 'Linux' && github.repository_owner == 'coder'
487
492
env :
488
493
DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
489
494
DD_CATEGORY : e2e
0 commit comments