Do not run snyk github workflow on forks of the repo
This commit is contained in:
parent
cd9dd83e9c
commit
f7383d4308
1 changed files with 5 additions and 3 deletions
8
.github/workflows/snyk.yml
vendored
8
.github/workflows/snyk.yml
vendored
|
@ -11,6 +11,7 @@ jobs:
|
|||
quarkus:
|
||||
name: Quarkus
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository == 'keycloak/keycloak' }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
@ -20,7 +21,7 @@ jobs:
|
|||
java-version: ${{ env.DEFAULT_JDK_VERSION }}
|
||||
distribution: temurin
|
||||
cache: maven
|
||||
|
||||
|
||||
- name: Build Quarkus
|
||||
run: mvn -Psnyk-quarkus -pl quarkus/dist -am -DskipTests clean install
|
||||
|
||||
|
@ -39,6 +40,7 @@ jobs:
|
|||
operator:
|
||||
name: Operator
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository == 'keycloak/keycloak' }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
@ -48,11 +50,11 @@ jobs:
|
|||
java-version: ${{ env.DEFAULT_JDK_VERSION }}
|
||||
distribution: temurin
|
||||
cache: maven
|
||||
|
||||
|
||||
- name: Build Keycloak
|
||||
run: mvn -Poperator -pl operator -am -DskipTests clean install
|
||||
|
||||
- uses: snyk/actions/setup@master
|
||||
- uses: snyk/actions/setup@master
|
||||
- name: Check for vulnerabilities for the Operator
|
||||
run: snyk test --policy-path=${GITHUB_WORKSPACE}/.github/snyk/.snyk --all-projects --prune-repeated-subdependencies --exclude=tests --sarif-file-output=operator-report.sarif operator
|
||||
continue-on-error: true
|
||||
|
|
Loading…
Reference in a new issue