Do not run snyk github workflow on forks of the repo

This commit is contained in:
Tero Saarni 2022-07-22 12:00:18 +03:00 committed by Bruno Oliveira da Silva
parent cd9dd83e9c
commit f7383d4308

View file

@ -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