[英]How to commit file to github using REST API for CI integration
我想通过 REST API 将 my.apk 文件发送到 github 存储库。
文件正在转换为 base64 并作为 blob 发送:
BLOB_SHA=$(curl -X POST https://api.github.com/repos/{user}/{repo}/git/blobs -H "Accept: application/vnd.github.v3.raw+json" -H "Authorization: Basic {token}" -d '{"content":{my app in base64},"encoding":"utf-8|base64"}' | jq '.sha')
但这里有一条消息:
bash: /mingw64/bin/curl: Argument list too long
我试图实现的是:在 Codemagic 上构建 apk,将 apk 发送到 github,触发 appium 测试自动化。
也许还有其他连接 Codemagic 构建和 appium 测试的可能性?
在构建 apk 之后,使用 Codemagic 运行 Appium 测试可能会更好。 在这种情况下,您不需要将任何二进制文件提交回存储库。 检查此链接以查看如何运行 Appium 测试的示例 https://docs.codemagic.io/yaml-testing/testing/#react-native-integration-tests-using-appium-and-emulator
但是,如果您仍然想提交文件,您可以只使用git
命令,但请确保您具有写入权限(例如查看此链接https://docs.codemagic.io/knowledge-base/add-a-git-tag-with-应用程序版本/ )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.