Repository navigation
ci: PR/CI 包注入 Bangumi OAuth 凭证 - #94
Merged
Merged
Conversation
- app/build.gradle.kts 从 gradle property / 环境变量读 BANGUMI_CLIENT_ID/SECRET,缺省空字符串(fork PR 照常编译, App 内报未配置而非炸构建) - build(debug APK)与 build-release 两个 job 均透传 secrets, debug 产物保留 7 天可直接装 HK1 联调
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
改了什么(纯 CI 接线,无业务代码)
app/build.gradle.kts:从 gradle property / 环境变量读BANGUMI_CLIENT_ID/BANGUMI_CLIENT_SECRET,缺省空字符串,注入BuildConfig。ci.yml:build(debug APK,产物保留 7 天)和build-release两个 job 透传上述 secrets。为什么先合这个
OAuth 实现分支合进来之前,CI 必须先会打带真凭证的包——否则 HK1 联调时分不清是 plumbing 坏了还是业务代码坏了。这个 PR 合并后,后续 OAuth 分支每次 push 的云端包都自带 secret,可直接装机测。
安全说明
git diff审计)。bgm.tv/dev/app重置 secret,再更新 secrets 即可;旧包同时作废。使用方待办(合 PR 不阻塞)
BANGUMI_CLIENT_ID/BANGUMI_CLIENT_SECRET(用http://127.0.0.1:13712/callback注册的那个 App)。-PBANGUMI_CLIENT_ID=.. -PBANGUMI_CLIENT_SECRET=..或环境变量 /~/.gradle/gradle.properties。验证
./gradlew :app:assembleDebug通过,生成的BuildConfig两字段为空字符串。