ci(lint): do not fail linter on `push` events (#5331)

Previous behavior:
The following error was causing an exit 1 in GitHub Actions when a pushing
to the `main` branch

```
Error: Similar commit hashes detected: previous sha is equivalent to the
current sha
```

Expeceted behavior:
Allow the linter to run succesfully even if the previous SHA has no files
changed

Solution:
Add `fetch-depth: 2` to retrieve the preceding commit
This commit is contained in:
Gustavo Valverde 2022-10-04 15:00:44 -04:00 committed by GitHub
parent 9f6a1fdef0
commit a4189857fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,7 @@ jobs:
id: changed-files-rust
uses: tj-actions/changed-files@v29.0.7
with:
fetch-depth: 2
files: |
**/*.rs
**/Cargo.toml
@ -53,6 +54,7 @@ jobs:
id: changed-files-workflows
uses: tj-actions/changed-files@v29.0.7
with:
fetch-depth: 2
files: |
.github/workflows/*.yml