forked from Codeit-FE18-Part3-Team4/Taskify
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (27 loc) · 752 Bytes
/
sync-main.yaml
File metadata and controls
31 lines (27 loc) · 752 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
name: Synchronize the main branch to forked repo
on:
push:
branches:
- main
jobs:
sync:
name: Sync forked repo
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
token: ${{ secrets.AUTO_ACTIONS }}
fetch-depth: 0
ref: main
- name: Add remote-url
run: |
git remote add forked-repo https://cskime:${{ secrets.AUTO_ACTIONS }}@github.com/cskime/Taskify
git config user.name cskime
git config user.email ${{ secrets.EMAIL }}
- name: Push changes to forked-repo
run: |
git push -f forked-repo main
- name: Clean up
run: |
git remote remove forked-repo