# When and Unless Step on GitHub Fork Pull Request (PR) but not on Primary Repo?

**URL:** <https://discuss.circleci.com/t/when-and-unless-step-on-github-fork-pull-request-pr-but-not-on-primary-repo/45940>\
**Category:** Build Environment\
**Tags:** circle-yml\
**Created:** [October 29, 2022, 3:15pm UTC](https://discuss.circleci.com/t/when-and-unless-step-on-github-fork-pull-request-pr-but-not-on-primary-repo/45940 "2022-10-29T15:15:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsforbes](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rsforbes/32/31471_2.png) [@rsforbes](https://discuss.circleci.com/u/rsforbes)\
**Post date:** [October 29, 2022, 3:15pm UTC](https://discuss.circleci.com/t/when-and-unless-step-on-github-fork-pull-request-pr-but-not-on-primary-repo/45940/1 "2022-10-29T15:15:16Z")

</div>

Struggling to skip a single step when a GitHub Fork opens a Pull Request. The gist. I do not want to expose secrets to PR builds, but I want to do everything else. When I accept the PR from the Fork, I want to run the entire build (which includes using secrets for security scanning).

What am I doing wrong?

I’ve used {\<\<\<—} to indicate what I “think” I should be doing but probably doing wrong. More attempts on conditions at the end.

sample config.yml  
jobs:  
main:  
parameters:  
image:  
type: string  
circle\_pr\_number:  
type: string  
default: $CIRCLE\_PR\_NUMBER \<\<\<— I couldn’t figure out how to use the Built-in environment variables in a conditional statement; my hack, Appears that $CIRCLE\_PR\_NUMBER is a string and not a number.

```
docker: 
  - image: <<parameters.image>>

steps: 
  - checkout
  - run: echo <<parameters.circle_pr_number>> <<<--- Outputs the correct value of the PR (e.g., 302)
  - unless:
      condition:  
        matches: <<<--- latest attempt was to use a regex
          pattern: \d
          value: <<parameters.circle_pr_number>>
      steps:
        - run: echo "condition met"

```

OTHER ATTEMPTS

```
      condition: <<parameters.circle_pr_number>>

      condition:  
                 equals: ["", <<parameters.circle_pr_number>>]

      condition:  
                 equals: [301 , <<parameters.circle_pr_number>>]

```

# Stumped.
