chore(ci): fix when npm job runs (#5440)

This commit is contained in:
Joe Previte 2022-08-10 13:43:28 -05:00 committed by GitHub
parent 6d8f30d579
commit 3335d0a456
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,9 +198,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 or on merge request # Only run if PR comes from base repo or event is not a PR
# Reason: forks cannot access secrets and this will always fail # Reason: forks cannot access secrets and this will always fail
if: github.event.pull_request.head.repo.full_name == github.repository || github.event.pull_request.merged == true if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo - name: Checkout repo