File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -22,17 +22,21 @@ jobs:
22
22
rm ./documentation/manpages/sdk/*
23
23
24
24
./documentation/manpages/tool/run_docker.sh
25
-
26
- if [[ -n $(git status -s) ]]; then
25
+
26
+ # Only add files with more than 2 changed lines
27
+ for line in $(git diff --numstat | awk '$1+$2 > 2 {print $3}'); do
28
+ git add "$line"
29
+ done
30
+
31
+ if ! git diff --cached --quiet; then
27
32
git config user.name 'github-actions'
28
33
git config user.email 'github-actions@github.com'
29
34
date=$(date +%F)
30
- git add .
31
35
title="[automated] Update man pages"
32
36
body="This action is executed twice a month to automatically update the manpages based on the latest changes to the dotnet/docs repo"
33
37
branch=update-man-page-$date
34
38
git checkout -b $branch
35
- git commit -a - m "$title"
39
+ git commit -m "$title"
36
40
git push -u origin $branch --force
37
41
gh pr create --base main --head $branch --title "$title" --body "$body"
38
42
fi
You can’t perform that action at this time.
0 commit comments