Skip to content

Commit 379333b

Browse files
committed
Remove if check from format.yml
1 parent 1f42ab0 commit 379333b

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/format.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ jobs:
3636

3737
- name: Commit and push changes if any
3838
run: |
39-
if [[ "$(git status --porcelain)" ]]; then
40-
git add .
41-
git config --global user.name "GitHub Actions"
42-
git config --global user.email "videocreator@outlook.de"
43-
git commit -m "$(echo -e "Reformat code\n\nOriginal commit: ${{ github.sha }}\nThis is an automated task.\nIf you have questions or concerns about this task,\nplease contact the provided email."
44-
git push
45-
else
46-
git status
47-
fi
39+
git add .
40+
git config --global user.name "GitHub Actions"
41+
git config --global user.email "videocreator@outlook.de"
42+
git commit -m "$(echo -e "Reformat code\n\nOriginal commit: ${{ github.sha }}\nThis is an automated task.\nIf you have questions or concerns about this task,\nplease contact the provided email."
43+
if [ $? = 0 ]; then git push; fi
44+
exit 0

0 commit comments

Comments
 (0)