1

I want to send my .apk file to the github repository through REST API.

File is converting to base64 and send as 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')

But here is a message:

bash: /mingw64/bin/curl: Argument list too long

What I try to achive is: build apk on Codemagic, send apk to github, trigger appium test automation.

Maybe there is any other posibility to connect Codemagic build and appium tests?

luker
  • 11
  • 2

1 Answers1

0

probably it will be better to run Appium tests with Codemagic after you built an apk. In this case you don't need to commit any binaries back to the repository. Check this link to see example how to run Appium tests https://docs.codemagic.io/yaml-testing/testing/#react-native-integration-tests-using-appium-and-emulator

However if you still want to commit file you can just use git commands but ensure you have write permissions (check this link for example https://docs.codemagic.io/knowledge-base/add-a-git-tag-with-app-version/)

Mikhail Tokarev
  • 2,843
  • 1
  • 14
  • 35
  • Hej. Thank you for the answer. I wonder if the option from first link is just for appium tests inside app project. In my case I have two project separated: 1 for flutter app, 2 for appium testing - and here I need access to apk file. Also I tried to use git commands from option 2 but there is a problem with LFS because codemagic tires to push all files generated with build. – luker Dec 20 '21 at 09:08
  • you can clone 2nd repo with appium tests during a build... anyway it will be faster and "cleaner" approach – Mikhail Tokarev Dec 20 '21 at 13:25