From: Jérôme Benoit Date: Thu, 7 Sep 2023 13:26:17 +0000 (+0200) Subject: build(ci): make dependency review works on PRs X-Git-Tag: v1.2.21~13 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3a389887aed29dda323355d2787f42ce10d02d28;p=e-mobility-charging-stations-simulator.git build(ci): make dependency review works on PRs Signed-off-by: Jérôme Benoit --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ec01225..a5bfe298 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,11 +19,14 @@ jobs: with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: 'Dependency Review' - if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '18.x' }} + if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x' }} uses: actions/dependency-review-action@v3 with: - base-ref: main + base-ref: ${{ github.ref_name }} head-ref: ${{ github.sha }} + - name: 'Pull Request Dependency Review' + if: ${{ github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x' }} + uses: actions/dependency-review-action@v3 - uses: pnpm/action-setup@v2 with: version: 8 @@ -65,11 +68,14 @@ jobs: with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: 'Dependency Review' - if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '18.x' }} + if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x' }} uses: actions/dependency-review-action@v3 with: - base-ref: main + base-ref: ${{ github.ref_name }} head-ref: ${{ github.sha }} + - name: 'Pull Request Dependency Review' + if: ${{ github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x' }} + uses: actions/dependency-review-action@v3 - uses: pnpm/action-setup@v2 with: version: 8