Skip to content

Commit a641636

Browse files
authored
Ignore date-only changes during manpage update (#49523)
1 parent 4177291 commit a641636

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/update-man-pages.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@ jobs:
2222
rm ./documentation/manpages/sdk/*
2323
2424
./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
2732
git config user.name 'github-actions'
2833
git config user.email 'github-actions@github.com'
2934
date=$(date +%F)
30-
git add .
3135
title="[automated] Update man pages"
3236
body="This action is executed twice a month to automatically update the manpages based on the latest changes to the dotnet/docs repo"
3337
branch=update-man-page-$date
3438
git checkout -b $branch
35-
git commit -a -m "$title"
39+
git commit -m "$title"
3640
git push -u origin $branch --force
3741
gh pr create --base main --head $branch --title "$title" --body "$body"
3842
fi

0 commit comments

Comments
 (0)