-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (27 loc) · 896 Bytes
/
sync-codetree.yml
File metadata and controls
34 lines (27 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Sync Codetree Subtree
on:
schedule:
- cron: '0 16 * * *' # 매일 KST 1시
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout algorithm repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # subtree 병합에 필요한 커밋 이력 확보
- name: Set Git config
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Add codetree remote
run: |
git remote add codetree https://github.com/junest66/codetree-solutions.git
git fetch codetree
- name: Pull codetree subtree
run: |
git subtree pull --prefix=codetree codetree main -m "chore(subtree): sync codetree"
- name: Push updated subtree
run: |
git push origin main