Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienpessu committed Aug 8, 2023
1 parent 0796abb commit c462e2e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,31 @@ jobs:
comment-summary-in-pr: true
license-check: false
```

## Exclude dependencies from their name or groups

Using the `deny-packages` you can exclude dependencies by their full name. You can add multiple values separated by a comma.
Using the `deny-groups` you can exclude dependencies by their group name. You can add multiple values separated by a comma.

In this example, we are excluding `log4j-api` and `log4j-code` from `maven` and `requests` from `pip` dependencies from the license check

```yaml
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read
pull-requests: write

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
with:
deny-packages: 'org.apache.logging.log4j:log4j-api,org.apache.logging.log4j:log4j-core'
deny-groups: 'com.bazaarvoice.maven'
```

0 comments on commit c462e2e

Please sign in to comment.