Skip to content

Commit

Permalink
scan: skip running if the PR head is a fork (#28107)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Cragun <me@ryan.ec>
  • Loading branch information
ryancragun authored Aug 16, 2024
1 parent 62e0e62 commit d5c6776
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ on:
jobs:
scan:
runs-on: ${{ github.repository == 'hashicorp/vault' && 'ubuntu-latest' || fromJSON('["self-hosted","ondemand","os=linux","type=c6a.4xlarge"]') }}
# The first check ensures this doesn't run on community-contributed PRs, who
# won't have the permissions to run this job.
# The first check ensures this doesn't run on community-contributed PRs, who won't have the
# permissions to run this job.
if: |
(startsWith(github.repository, 'hashicorp/vault') || (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) &&
! github.event.pull_request.head.repo.fork &&
github.actor != 'dependabot[bot]' &&
github.actor != 'hc-github-team-secure-vault-core'
steps:
Expand Down

0 comments on commit d5c6776

Please sign in to comment.