Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add `ref` option documentation for pull request workflow trigger.
  • Loading branch information
edplato authored Feb 26, 2022
1 parent c36ff9a commit 0af17d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Edit your corresponding actions `yml` file or create a new one.

`trufflehog-actions-scan` now uses `actions/checkout@v2`. Using a previous version may cause issues with future support of this action.

With `actions/checkout@v2` make sure to include `fetch-depth: 0` as shown below when checking out the repository as it will make the entire git commit history available to be scanned. Alternatively, ensure the value for `fetch-depth` is greater than the `max_depth` flag used by trufflehog to ensure that trufflehog runs at your desired commit history depth.
With `actions/checkout@v2` make sure to include `fetch-depth: 0` as shown below when checking out the repository as it will make the entire git commit history available to be scanned. Alternatively, ensure the value for `fetch-depth` is greater than the `max_depth` flag used by trufflehog to ensure that trufflehog runs at your desired commit history depth. `ref: ${{ github.head_ref }}` is necessary for pull request workflow trigger.


### Basic
Expand All @@ -51,6 +51,7 @@ steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.head_ref }} // necessary for pull request workflow trigger
- name: trufflehog-actions-scan
uses: edplato/trufflehog-actions-scan@master
```
Expand All @@ -62,6 +63,7 @@ steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.head_ref }} // necessary for pull request workflow trigger
- name: trufflehog-actions-scan
uses: edplato/trufflehog-actions-scan@master
with:
Expand Down

0 comments on commit 0af17d9

Please sign in to comment.