Skip to content

Commit 9f7e951

Browse files
committed
ci(docs): prevent fetching master branch when already on it in check_docs workflow
1 parent 642f846 commit 9f7e951

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/check_docs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ jobs:
4242
id: changed-files
4343
run: |
4444
git config --global --add safe.directory /__w/manticoresearch/manticoresearch
45-
git fetch origin master:master
45+
# Update local master only if we're not currently on it
46+
if [ "${{ github.ref_name }}" != "master" ]; then
47+
git fetch origin master:master
48+
fi
4649
echo "changed_files=$(git diff-tree --no-commit-id --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
4750
4851
- name: Get changed doc filepathes

0 commit comments

Comments
 (0)