You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-16Lines changed: 28 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,26 @@
14
14
15
15
## 🛠️ Usage
16
16
17
-
### 1. **Create an Ignore File**
17
+
### 1. **Add the GitHub Action**
18
+
Create a GitHub Actions workflow in `.github/workflows/duplicate_guard.yml`:
19
+
20
+
```yaml
21
+
name: Duplicate Guard
22
+
on:
23
+
pull_request:
24
+
branches:
25
+
- main
26
+
workflow_dispatch:
27
+
28
+
jobs:
29
+
duplicate_guard:
30
+
runs-on: ubuntu-latest
31
+
steps:
32
+
- name: Duplicate Guard
33
+
uses: chris-rutkowski/duplicate-guard@v1.0.2
34
+
```
35
+
36
+
### 2. **Create an ignore file** (optional)
18
37
Add a `duplicate_guard.ignore` file to the root of your repository to define patterns for files or directories to exclude from duplicate checks. The syntax follows `.gitignore` conventions.
19
38
20
39
**Example `duplicate_guard.ignore`:**
@@ -26,38 +45,31 @@ logs/*
26
45
27
46
---
28
47
29
-
### 2. **Add the GitHub Action**
30
-
Create a GitHub Actions workflow in `.github/workflows/duplicate_guard.yml`:
48
+
## ♻️ Find existing duplicates
49
+
50
+
Run the action manually using the `workflow_dispatch` event to scan and find duplicates in your repository.
31
51
32
52
```yaml
33
53
name: Duplicate Guard
34
54
on:
35
-
pull_request:
36
-
branches:
37
-
- master
38
55
workflow_dispatch:
56
+
pull_request:
39
57
40
-
jobs:
41
-
filesize_guard:
42
-
runs-on: ubuntu-latest
43
-
steps:
44
-
- name: Duplicate Guard
45
-
uses: chris-rutkowski/duplicate-guard@v1.0.1
58
+
...
46
59
```
47
60
48
61
---
49
62
50
63
## ⚙️ Configuration
51
64
52
-
### **Specify a Custom Ignore File Path**
53
-
If your `duplicate_guard.ignore` file is not in the root directory, specify its location using the `ignore_file` input:
0 commit comments