mirror of https://github.com/coder/code-server.git
fix: skip docs/npm workflows on forks (#4875)
Co-authored-by: Asher <ash@coder.com>
This commit is contained in:
parent
d7c1894fb4
commit
23734d356a
|
@ -184,6 +184,9 @@ jobs:
|
||||||
# This environment "npm" requires someone from
|
# This environment "npm" requires someone from
|
||||||
# coder/code-server-reviewers to approve the PR before this job runs.
|
# coder/code-server-reviewers to approve the PR before this job runs.
|
||||||
environment: npm
|
environment: npm
|
||||||
|
# Only run if PR comes from base repo
|
||||||
|
# Reason: forks cannot access secrets and this will always fail
|
||||||
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
|
@ -22,6 +22,9 @@ jobs:
|
||||||
name: Docs preview
|
name: Docs preview
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
environment: CI
|
environment: CI
|
||||||
|
# Only run if PR comes from base repo
|
||||||
|
# Reason: forks cannot access secrets and this will always fail
|
||||||
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||||
steps:
|
steps:
|
||||||
- name: Cancel Previous Runs
|
- name: Cancel Previous Runs
|
||||||
uses: styfle/cancel-workflow-action@0.9.1
|
uses: styfle/cancel-workflow-action@0.9.1
|
||||||
|
|
Loading…
Reference in New Issue