Expose dependency comment content

This commit is contained in:
Josh Soref
2024-02-19 11:07:56 -05:00
parent 0ca1f606a4
commit 64f81cd2da
7 changed files with 68 additions and 17 deletions
+31
View File
@@ -164,6 +164,37 @@ jobs:
comment-summary-in-pr: always
```
## Getting the results of the action in a later step
Using the `comment-content` output you can get the results of the action in a workflow step.
```yaml
name: 'Dependency Review'
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
id: review
uses: actions/dependency-review-action@main
with:
fail-on-severity: critical
deny-licenses: LGPL-2.0, BSD-2-Clause
- name: 'Report'
shell: bash
env:
comment: ${{ steps.review.outputs.comment-content }}
run: |
echo "$comment"
```
## Exclude dependencies from the license check
Using the `allow-dependencies-licenses` you can exclude dependencies from the license check. The values should be provided in [purl](https://github.com/package-url/purl-spec) format.