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
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This GitHub Action allows you to compare two files based on a tolerance, output
4
4
5
5
## Usage
6
6
7
-
The following shows how to compare two files and output the difference to a file.
7
+
The following shows how to compare two files, making sure only additions happened, and output the difference to a file.
8
8
9
9
```
10
10
name: "build-test"
@@ -19,6 +19,7 @@ jobs:
19
19
with:
20
20
old: file1.txt
21
21
new: file2.txt
22
+
mode: addition
22
23
tolerance: better
23
24
output: out.txt
24
25
```
@@ -35,9 +36,13 @@ See the [examples workflow](.github/workflows/examples.yml) for more details and
35
36
36
37
**Required** The second file to compare
37
38
39
+
### `mode`
40
+
41
+
**Required** The method used to measure the `tolerance`, can be either `addition` (addition are better) or `deletion` (deletion are better)
42
+
38
43
### `tolerance`
39
44
40
-
**Required** The tolerance to check the diff for, can be either `better` (only deletion), `mixed-better` (more deletion than addition), `same` (stay the exact same), `mixed` (same amount of lines but not the same), `mixed-worse` (more addition than deletion) or `worse` (only addition)
45
+
**Required** The tolerance to check the diff for, depends on `mode`, can be either (examples given with mode = `deletion`)`better` (only deletion), `mixed-better` (more deletion than addition), `same` (stay the exact same), `mixed` (same amount of lines but not the same), `mixed-worse` (more addition than deletion) or `worse` (only addition)
0 commit comments