Skip to content

Commit 7c5a254

Browse files
fix(ci): Only check for diff in to skip ci in pull requests (#3600)
1 parent 7194f13 commit 7c5a254

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/skip-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
- name: Check diff from Pull Request
2222
id: check_diff
2323
run: |
24+
if [ -z "${{ github.base_ref }}" ] || [ -z "${{ github.head_ref }}" ]; then
25+
echo "This action is intended to be run on pull requests only."
26+
exit 0
27+
fi
28+
2429
skipList=(".github/CODEOWNERS" ".prettierignore")
2530
# Ignores changelog.md, readme.md,...
2631
fileChangesArray=($(git diff --name-only origin/${{ github.base_ref }}..origin/${{ github.head_ref }} | grep -v '\.md$'))

0 commit comments

Comments
 (0)