feat(pages): 支持 GitHub Release 部署源

增加 latest/tag 手动检查与同步、ETag 与限流退避、资源替换确认,以及对应的前端来源管理和部署来源展示。
This commit is contained in:
deqiying
2026-07-19 18:31:42 +08:00
parent 38b0516937
commit c39a3edcc3
34 changed files with 5751 additions and 278 deletions
+4 -4
View File
@@ -822,8 +822,8 @@ func fenceDeploymentActivationSource(
audit.SourceIdentity = state.Source.SourceIdentity
audit.AutoDisabled = state.Source.AutoUpdateEnabled
if err := tx.Model(state.Source).Updates(map[string]any{
"config_version": state.Source.ConfigVersion + 1,
"auto_update_enabled": false,
sourceColumnConfigVersion: state.Source.ConfigVersion + 1,
sourceColumnAutoUpdateEnabled: false,
}).Error; err != nil {
return err
}
@@ -856,8 +856,8 @@ func switchActiveDeploymentTx(
return err
}
if err := tx.Model(deployment).Updates(map[string]any{
"status": model.PagesDeploymentStatusActive,
"activated_at": &now,
pagesDeploymentColumnStatus: model.PagesDeploymentStatusActive,
"activated_at": &now,
}).Error; err != nil {
return err
}