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