From 234dd87cd84b40a209c21662402864d0d005a298 Mon Sep 17 00:00:00 2001 From: jkan2 Date: Tue, 5 Nov 2024 16:21:04 -0800 Subject: [PATCH] fix(ci): prevents semgrep from failing on forks (#3092) * prevents semgrep from failing when its coming from a fork * update semgrep workflow operator logic Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update .github/workflows/semgrep.yml Co-authored-by: Alex Gartner --------- Co-authored-by: jkan2 <5862123+jkan2@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Alex Gartner --- .github/workflows/semgrep.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index fcffcf7855..bcefc3da55 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -17,7 +17,9 @@ jobs: container: image: ghcr.io/zeta-chain/semgrep-semgrep:1.90.0 - if: (github.actor != 'dependabot[bot]') + if: | + github.actor != 'dependabot[bot]' && + (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'zeta-chain/node') steps: - uses: actions/checkout@v4 - name: Checkout semgrep-utilities repo