-
Notifications
You must be signed in to change notification settings - Fork 16
45 lines (38 loc) · 1.63 KB
/
sync.yml
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
35
36
37
38
39
40
41
42
43
44
45
name: Update B Repository # 工作流程的名称
on:
push:
branches:
- docs-sync # test for now
jobs:
update-b-repo: # 工作流程中的一个任务
runs-on: ubuntu-latest # 任务运行的环境
steps: # 任务中的步骤
- name: Checkout A repository # 第一步:检出 A 仓库的代码
uses: actions/checkout@v3
- name: Set up Git # 第二步:设置 Git 用户信息
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Clone B repository # 第三步:克隆 B 仓库并创建一个新分支
run: |
git clone https://github.com/winchesHe/nextui B-repo --depth 1 # 替换为实际的 B 仓库路径
cd B-repo
git checkout -b update-branch # 创建一个新分支
- name: Make changes to B repository # 第四步:在 B 仓库中进行修改并提交更改
run: |
cd B-repo
# 在这里添加你的命令来修改 B 仓库
echo "Some changes" > some-file.txt
git add .
git commit -m "Update from A repository"
- name: Create Pull Request # 第六步:创建一个 Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
# repository: https://github.com/winchesHe/nextui/B-repo # 替换为实际的 B 仓库路径
# head: update-branch
base: main
path: B-repo
branch: example-branch
title: "Update from A repository"
body: "This PR updates B repository with changes from A repository."