Skip to content

Commit 754c748

Browse files
committed
fix: skip docs/npm workflows on forks
1 parent 94f378c commit 754c748

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/ci.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ jobs:
184184
# This environment "npm" requires someone from
185185
# coder/code-server-reviewers to approve the PR before this job runs.
186186
environment: npm
187+
# Only run if PR comes from base repo
188+
# Reason: forks cannot access secrets and this will always fail
189+
if: github.event.pull_request.head.repo.full_name == github.repository
187190
runs-on: ubuntu-latest
188191
steps:
189192
- uses: actions/checkout@v2

.github/workflows/docs-preview.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
name: Docs preview
2323
runs-on: ubuntu-20.04
2424
environment: CI
25+
# Only run if PR comes from base repo
26+
# Reason: forks cannot access secrets and this will always fail
27+
if: github.event.pull_request.head.repo.full_name == github.repository
2528
steps:
2629
- name: Cancel Previous Runs
2730
uses: styfle/cancel-workflow-action@0.9.1

0 commit comments

Comments
 (0)