Skip to content

ci: update

ci: update #25

Workflow file for this run

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: Push changes to B repository # 第五步:将更改推送到 B 仓库的新分支
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd B-repo
git push https://github.com/winchesHe/nextui update-branch
- 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: update-branch
push-to-fork: winchesHe/B-repo
title: "Update from A repository"
body: "This PR updates B repository with changes from A repository."