diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4c03b5f8ad4..93c65f2a688 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -20,14 +20,14 @@ jobs: uses: actions/checkout@v3 - name: Register workspace path - if: github.ref != 'refs/heads/main' + if: ${{ github.event.number > 0 }} run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Checkout Pull Request env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} id: checkout - if: github.ref != 'refs/heads/main' + if: ${{ github.event.number > 0 }} run: | gh pr checkout ${{ github.event.number }} @@ -60,14 +60,14 @@ jobs: steps: - uses: actions/checkout@v3 - name: Register workspace path - if: github.ref != 'refs/heads/main' + if: ${{ github.event.number > 0 }} run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Checkout Pull Request env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} id: checkout - if: github.ref != 'refs/heads/main' + if: ${{ github.event.number > 0 }} run: | gh pr checkout ${{ github.event.number }} diff --git a/.semgrepignore b/.semgrepignore new file mode 100644 index 00000000000..d865a9dc741 --- /dev/null +++ b/.semgrepignore @@ -0,0 +1,2 @@ +# Common large paths +vendor/