Skip to content

Commit b8787c4

Browse files
committed
update workflow
1 parent c14aa8b commit b8787c4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/sync_to_second_repo.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
# 1. Repository 클론
13+
# 1. Checkout the Source Repository
1414
- name: Checkout Source Repository
1515
uses: actions/checkout@v3
1616
with:
1717
submodules: true
18-
fetch-depth: 0 # 모든 커밋 히스토리를 가져옴
18+
fetch-depth: 0
1919

20-
# 2. 변경된 파일 탐지
20+
# 2. Detect Changed Files
2121
- name: Detect Changed Files
2222
id: changes
2323
run: |
@@ -28,15 +28,14 @@ jobs:
2828
fi
2929
echo "changed_files=$CHANGED_FILES" >> $GITHUB_ENV
3030
31-
# 3. 변경된 파일 복사
31+
# 3. Copy Changed Files to Second Repository
3232
- name: Copy Changed Files to Second Repository
3333
run: |
3434
for FILE in $CHANGED_FILES; do
35-
# 두 번째 repository 디렉토리에 파일 복사
3635
cp --parents "$FILE" sanghoon/
3736
done
3837
39-
# 4. 두 번째 repository에 변경 사항 커밋 및 Push
38+
# 4. Commit and Push to Second Repository
4039
- name: Commit and Push to Second Repository
4140
run: |
4241
cd sanghoon
@@ -47,5 +46,6 @@ jobs:
4746
git add .
4847
git commit -m "Sync changes from first repository [skip ci]" || echo "No changes to commit"
4948
50-
# 두 번째 repository에 push
49+
# PAT를 사용하여 HTTPS로 push
50+
git remote set-url origin https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/actionTestTempOrg/temp.git
5151
git push origin main

0 commit comments

Comments
 (0)