Skip to content

Commit 52d3016

Browse files
committed
Update
1 parent f70bf3d commit 52d3016

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/fetch-ips.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ jobs:
3434

3535
- name: Commit and push changes
3636
run: |
37-
git config user.name "Sefinek Actions"
38-
git config user.email "[email protected]"
37+
MODIFIED_FILES=$(git status --porcelain)
38+
FILE_COUNT=$(echo "$MODIFIED_FILES" | wc -l)
3939
40-
if git diff --quiet; then
40+
if [[ $FILE_COUNT -eq 0 ]]; then
4141
echo "Canceled. No files were modified."
4242
exit 0
4343
fi
4444
45-
MODIFIED_FILES=$(git diff --name-only HEAD)
46-
FILE_COUNT=$(echo "$MODIFIED_FILES" | wc -l)
45+
git config user.name "Sefinek Actions"
46+
git config user.email "[email protected]"
4747
4848
git commit -am "Update the list of malicious IP addresses [$FILE_COUNT files]" -m "$MODIFIED_FILES"
4949
git push origin main

0 commit comments

Comments
 (0)