Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit514921e

Browse files
committed
ci: Enable forks to run CI
All steps that require tokens are optional for forks,and will be skipped if the owner is not "coder".
1 parentc1ff537 commit514921e

File tree

3 files changed

+13
-118
lines changed

3 files changed

+13
-118
lines changed

‎.github/workflows/chromatic.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ jobs:
3333
with:
3434
buildScriptName:"storybook:build"
3535
exitOnceUploaded:true
36-
projectToken:${{ secrets.CHROMATIC_PROJECT_TOKEN }}
36+
# Chromatic states its fine to make this token public. See:
37+
# https://www.chromatic.com/docs/github-actions#forked-repositories
38+
projectToken:695c25b6cb65
3739
workingDir:"./site"
3840

3941
# This is a separate step for mainline only that auto accepts and changes
@@ -48,5 +50,5 @@ jobs:
4850
with:
4951
autoAcceptChanges:true
5052
buildScriptName:"storybook:build"
51-
projectToken:${{ secrets.CHROMATIC_PROJECT_TOKEN }}
53+
projectToken:695c25b6cb65
5254
workingDir:"./site"

‎.github/workflows/coder-test-stability.yaml

Lines changed: 0 additions & 98 deletions
This file was deleted.

‎.github/workflows/coder.yaml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@ name: coder
22

33
on:
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

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp