Skip to content

Commit c2b44a6

Browse files
committed
add yaml to sync test
1 parent 758c214 commit c2b44a6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/sync_to_second_repo.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ jobs:
1414
- name: Checkout Source Repository
1515
uses: actions/checkout@v3
1616
with:
17-
submodules: true # 서브모듈도 함께 체크아웃
17+
submodules: true
18+
fetch-depth: 0 # 모든 커밋 히스토리를 가져옴
1819

1920
# 2. 변경된 파일 탐지
2021
- name: Detect Changed Files
2122
id: changes
2223
run: |
23-
# Git diff로 변경된 파일의 경로만 추출
24-
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD)
24+
if git rev-parse HEAD^ >/dev/null 2>&1; then
25+
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD)
26+
else
27+
CHANGED_FILES=$(git ls-files)
28+
fi
2529
echo "changed_files=$CHANGED_FILES" >> $GITHUB_ENV
2630
2731
# 3. 변경된 파일 복사

0 commit comments

Comments
 (0)