Compare commits

...

2 Commits

Author SHA1 Message Date
HibiKier
da6d5b4be4
🐛 修复bot个人介绍重载后不重新读取个人介绍文件 (#1990)
Some checks failed
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Sequential Lint and Type Check / ruff-call (push) Waiting to run
Sequential Lint and Type Check / pyright-call (push) Blocked by required conditions
Release Drafter / Update Release Draft (push) Waiting to run
Force Sync to Aliyun / sync (push) Waiting to run
检查bot是否运行正常 / bot check (push) Has been cancelled
Update Version / update-version (push) Has been cancelled
2025-07-24 15:59:28 +08:00
HibiKier
62fac483f2
feat(workflow): 新增阿里云强制同步工作流配置 (#1991) 2025-07-24 15:59:17 +08:00
3 changed files with 29 additions and 0 deletions

26
.github/workflows/sync-to-aliyun.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Force Sync to Aliyun
on:
push:
branches: ["main"]
jobs:
sync:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global http.postBuffer 524288000
git config --global core.compression 0
- name: Add aliyun remote
run: |
git remote add aliyun https://${{secrets.ALIYUN_ACCOUNT}}:${{secrets.ALIYUN_PASSWORD}}@codeup.aliyun.com/67a361cf556e6cdab537117a/zhenxun-org/zhenxun_bot.git
git fetch aliyun main --force # 强制更新本地引用
- name: Force push
run: git push --progress --force aliyun HEAD:main

View File

@ -1,3 +1,4 @@
import asyncio
from typing_extensions import Self
from nonebot.adapters import Bot
@ -132,6 +133,7 @@ class FgRequest(Model):
bot.self_id
)
if file_path:
await asyncio.sleep(2)
await PlatformUtils.send_message(
bot,
req.user_id,

View File

@ -76,6 +76,7 @@ class BotProfileManager:
_f = PROFILE_IMAGE_PATH / f
if _f.is_file():
_f.unlink()
cls._bot_data.clear()
@classmethod
async def _read_profile(cls, bot_id: str):