forked from adams549659584/go-proxy-bingai
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
984e0ef
commit 248582b
Showing
1 changed file
with
15 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,38 @@ | ||
name: Upstream Sync | ||
name: 同步分支 | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # every day | ||
- cron: "0 0 * * *" # 每天凌晨12点运行一次 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync_latest_from_upstream: | ||
name: Sync latest commits from upstream repo | ||
name: 从上游仓库同步最新提交 | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.repository.fork }} | ||
|
||
steps: | ||
# Step 1: run a standard checkout action | ||
- name: Checkout target repo | ||
# 第一步:运行一个标准的checkout action | ||
- name: 检出目标仓库 | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: run the sync action | ||
- name: Sync upstream changes | ||
# 第二步:运行同步action | ||
- name: 同步上游变更 | ||
id: sync | ||
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 | ||
with: | ||
upstream_sync_repo: https://github.com/Harry-zklcdc/go-proxy-bingai | ||
upstream_sync_branch: main | ||
target_sync_branch: main | ||
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set | ||
|
||
# Set test_mode true to run tests instead of the true action!! | ||
test_mode: false | ||
|
||
- name: Sync check | ||
if: failure() | ||
run: | | ||
echo "[Error] 由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次,详细教程请查看:https://github.com/Yidadaa/ChatGPT-Next-Web/blob/main/README_CN.md#%E6%89%93%E5%BC%80%E8%87%AA%E5%8A%A8%E6%9B%B4%E6%96%B0" | ||
echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork. Please refer to the detailed tutorial for instructions: https://github.com/Yidadaa/ChatGPT-Next-Web#enable-automatic-updates" | ||
exit 1 | ||
# 第三步:运行创建拉取请求action | ||
- name: 创建拉取请求 | ||
uses: peter-evans/create-pull-request@v3.10.1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} # 自动生成,无需设置 | ||
branch: create-pull-request/patch # 拉取请求分支名 | ||
title: 同步上游变更 # 拉取请求标题 | ||
body: 这是一个自动创建的拉取请求,用来同步上游仓库的变更。 # 拉取请求内容 |
248582b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
go-proxy-bingai – ./
go-proxy-bingai-mu-dun.vercel.app
go-proxy-bingai-git-master-nothingness-void.vercel.app
go-proxy-bingai-nothingness-void.vercel.app
bingai.nothingnessvoid.tech