We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92a6f95 commit 9228efeCopy full SHA for 9228efe
1 file changed
.github/workflows/main.yml
@@ -0,0 +1,37 @@
1
+name: Sync fork from upstream
2
+
3
+on:
4
+ schedule:
5
+ - cron: "0 3 * * *" # 每天 03:00 UTC,可改
6
+ workflow_dispatch:
7
8
+permissions:
9
+ contents: write
10
11
+jobs:
12
+ sync:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout fork
16
+ uses: actions/checkout@v4
17
+ with:
18
+ ref: main
19
+ fetch-depth: 0
20
21
+ - name: Configure git
22
+ run: |
23
+ git config user.name "github-actions[bot]"
24
+ git config user.email "github-actions[bot]@users.noreply.github.com"
25
26
+ - name: Add upstream and fetch
27
28
+ git remote add upstream https://github.com/TOZHR/grok2api.git
29
+ git fetch upstream
30
31
+ - name: Merge upstream/main into main
32
33
+ git merge --ff-only upstream/main || git merge upstream/main
34
35
+ - name: Push changes
36
37
+ git push origin main
0 commit comments