Secret Files in Github Actions
Kyaw Soe Win
Experienced Mobile Developer | Android Developer | Mobile Engineer | Specializing in mobile application development | Flutter Developer | Jetpack Compose | Dart | KMP
When working with sensitive files like google-services.json in a public repository (where anyone can see your code), it's generally not recommended to include them directly. However, if you still need to include such a file, you can follow these steps:
1 : Base64 Encode File
openssl base64 < google-services.json | tr -d '\n' | tee google_services.txt
This command converts the google-services.json file into a base64-encoded format and saves it to a file named google_services.txt.
2 : Copy the Encoded Result:
3 : Add to Repository Secrets:
4 : Update your workflow yaml
Congratulations. You did it.
Mobile Application Developer
8 个月Such a nice content. Keep it up bro!
Android / Flutter Developer
8 个月Keep going bro. Waiting new content.