Skip security-scan and test comment notifications on community PRs (#22351)

This commit is contained in:
Violet Hynes
2023-08-16 09:19:53 -04:00
committed by GitHub
parent ecd9ed21b8
commit 71a31d4055
2 changed files with 9 additions and 2 deletions

View File

@@ -357,7 +357,11 @@ jobs:
needs.test-go-fips.result == 'success' ||
needs.test-go-fips.result == 'failure' ||
needs.test-go-race.result == 'success' ||
needs.test-go-race.result == 'failure')
needs.test-go-race.result == 'failure') &&
(github.repository == 'hashicorp/vault' &&
(github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name))
# The last check ensures this doesn't run on community-contributed PRs, who
# won't have the permissions to run this job.
needs:
- test-go
- test-go-fips

View File

@@ -11,7 +11,10 @@ on:
jobs:
scan:
runs-on: ['linux', 'large']
if: ${{ github.actor != 'dependabot[bot]' || github.actor != 'hc-github-team-secure-vault-core' }}
# The first check ensures this doesn't run on community-contributed PRs, who
# won't have the permissions to run this job.
if: ${{ (github.repository == 'hashicorp/vault' && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name))
&& (github.actor != 'dependabot[bot]' || github.actor != 'hc-github-team-secure-vault-core') }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3