cardputer.cc 在线提交:网页直接上传 .deb(Cloudflare Worker + GitHub 联动)#11
Closed
eggfly wants to merge 1 commit into
Closed
Conversation
Direct .deb upload from the browser, enabled by the self-owned domain: a Cloudflare Worker on api.cardputer.cc accepts POST uploads (CORS is under our control, bypassing GitHub's uploads endpoint restriction), authenticates developers via a zero-scope GitHub OAuth login, stores the binary in the packages repo's web-upload-buffer release with a bot token, and fires a repository_dispatch. A ready-to-copy workflow for CardputerZero/packages runs the same validation as validate-pr.yml (sha256, control fields, .desktop, maintainer email binding, version monotonicity), collects store metadata from the developer's app-builder.json, and opens the publish PR (or a feedback issue on failure). Includes the static submit page and a Chinese deployment guide. Co-authored-by: eggfly <lihaohua90@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
域名
cardputer.cc已注册,"表单直接上传 deb"这条路打通了:文件 POST 到我们自己的api.cardputer.cc(Worker 自己决定 CORS 头),与 GitHub 的所有交互都在 Worker 服务端完成,不受浏览器跨域限制。架构
产物格式与
czdev publish完全一致,两条通道并存、共用审核管线。内容
online-submit/worker/— Cloudflare Worker(OAuth 登录、HMAC 会话 cookie、收文件、转存 Release、触发 dispatch),无第三方依赖,wrangler deploy即可online-submit/packages-workflow/process-web-submission.yml— 复制到CardputerZero/packages的处理 workflow(已通过 yamllint/bash -n/内嵌 python 编译校验)online-submit/site/submit.html— 提交页(登录 + 拖拽上传 + 结果反馈),复制到网站仓库即可用online-submit/README.md— 中文部署指南(Cloudflare 接入、OAuth App、bot token、Pages 自定义域名)+ 安全设计说明 + OSS 直传的取舍分析部署前提(需要人工操作)
cardputer.cc接入 Cloudflare(免费版),wrangler deploy+ 4 个 secrethttps://api.cardputer.cc/auth/callback)CardputerZero/packages有 Contents 写权限的 bot PATCardputerZero/packages和cardputerzero.github.io仍无写权限(本轮实测依旧被拒),在 Cursor GitHub App 的 Repository access 里加上这两个仓库后我可以直接提 PR 落地安全要点
dpkg-deb完成,.deb永不执行