Skip to content

Commit 468ad4f

Browse files
committed
skip if bot
1 parent f053b29 commit 468ad4f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/format.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ jobs:
1818
ssh-key: ${{ env.SSH_KEY }}
1919
fetch-depth: 0
2020

21+
22+
- name: Skip if bot
23+
run: |
24+
AUTHOR=$(git log -1 --pretty=%an)
25+
if [[ $AUTHOR =~ "bot|Bot" ]]; then
26+
echo "Commit made by bot, skipping further steps in the pipeline."
27+
exit 0
28+
fi
29+
2130
- name: Install python
2231
uses: actions/setup-python@v3
2332

@@ -39,5 +48,5 @@ jobs:
3948
run: |
4049
git config user.name "Bot"
4150
git config user.email "<[email protected]>"
42-
git commit -am "Fix file format [skip ci]"
51+
git commit -am "Fix file format"
4352
git push origin HEAD:${{github.event.pull_request.head.ref}}

0 commit comments

Comments
 (0)