Skip to content

Commit 4630707

Browse files
authored
Add GitHub Actions workflow to sync fork
This workflow automatically syncs the fork with the upstream repository every 6 hours or on manual dispatch.
1 parent 90eff05 commit 4630707

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Skip to content
2+
zhaojingpo
3+
edgetunnel
4+
Repository navigation
5+
代码
6+
拉取请求
7+
Actions
8+
项目
9+
Wiki
10+
安全
11+
统计
12+
设置
13+
Sync Fork Directly
14+
Sync Fork Directly #1
15+
All jobs
16+
Run details
17+
Workflow file for this run
18+
.github/workflows/fork update.yml at be7dbb7
19+
name: Sync Fork Directly
20+
21+
on:
22+
schedule:
23+
- cron: '0 */6 * * *'
24+
workflow_dispatch:
25+
26+
jobs:
27+
sync:
28+
run-on: ubuntu-latest
29+
permissions:
30+
contents: write
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Sync upstream
37+
run: |
38+
git config --global user.name "github-actions[bot]"
39+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
40+
git remote add upstream https://github.com/cmliu/edgetunnel.git
41+
git fetch upstream
42+
git checkout main
43+
git merge --allow-unrelated-histories upstream/main
44+
git push origin main

0 commit comments

Comments
 (0)