@@ -2,15 +2,6 @@ name: coder
22
33on :
44 push :
5- branches :
6- - main
7- - " release/*"
8- tags :
9- - " *"
10-
11- pull_request :
12- branches :
13- - " *"
145
156 workflow_dispatch :
167
@@ -178,7 +169,7 @@ jobs:
178169 -timeout=3m -count=$GOCOUNT -short -failfast
179170
180171 - name : Upload DataDog Trace
181- if : (success() || failure()) && github.actor != 'dependabot[bot]'
172+ if : (success() || failure()) && github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
182173 env :
183174 DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
184175 DD_DATABASE : fake
@@ -187,7 +178,7 @@ jobs:
187178 run : go run scripts/datadog-cireport/main.go gotests.xml
188179
189180 - uses : codecov/codecov-action@v2
190- if : github.actor != 'dependabot[bot]'
181+ if : github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
191182 with :
192183 token : ${{ secrets.CODECOV_TOKEN }}
193184 files : ./gotests.coverage
@@ -264,25 +255,25 @@ jobs:
264255 -count=1 -parallel=2 -race -failfast
265256
266257 - name : Upload DataDog Trace
267- if : (success() || failure()) && github.actor != 'dependabot[bot]'
258+ if : (success() || failure()) && github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
268259 env :
269260 DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
270261 DD_DATABASE : postgresql
271262 GIT_COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
272263 run : go run scripts/datadog-cireport/main.go gotests.xml
273264
274265 - uses : codecov/codecov-action@v2
275- if : github.actor != 'dependabot[bot]'
266+ if : github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
276267 with :
277268 token : ${{ secrets.CODECOV_TOKEN }}
278269 files : ./gotests.coverage
279270 flags : unittest-go-${{ matrix.os }}
280- fail_ci_if_error : true
271+ fail_ci_if_error : ${{ github.repository_owner == 'coder' }}
281272
282273 deploy :
283274 name : " deploy"
284275 runs-on : ubuntu-latest
285- if : github.ref == 'refs/heads/main'
276+ if : github.ref == 'refs/heads/main' && github.repository_owner == 'coder'
286277 permissions :
287278 contents : read
288279 id-token : write
@@ -391,15 +382,15 @@ jobs:
391382 working-directory : site
392383
393384 - uses : codecov/codecov-action@v2
394- if : github.actor != 'dependabot[bot]'
385+ if : github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
395386 with :
396387 token : ${{ secrets.CODECOV_TOKEN }}
397388 files : ./site/coverage/lcov.info
398389 flags : unittest-js
399390 fail_ci_if_error : true
400391
401392 - name : Upload DataDog Trace
402- if : (success() || failure()) && github.actor != 'dependabot[bot]'
393+ if : (success() || failure()) && github.actor != 'dependabot[bot]' && github.repository_owner == 'coder'
403394 env :
404395 DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
405396 DD_CATEGORY : unit
@@ -483,7 +474,7 @@ jobs:
483474 working-directory : site
484475
485476 - name : Upload DataDog Trace
486- if : (success() || failure()) && github.actor != 'dependabot[bot]' && runner.os == 'Linux'
477+ if : (success() || failure()) && github.actor != 'dependabot[bot]' && runner.os == 'Linux' && github.repository_owner == 'coder'
487478 env :
488479 DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
489480 DD_CATEGORY : e2e
0 commit comments