Working on installer.to with SCoRe Lab for GSoC 2020: Week 5

Heshan Geasman
SCoRe Lab
Published in
2 min readJul 8, 2020

My previous Medium article got published under SCoRe as https://medium.com/scorelab/working-on-installer-to-with-score-lab-for-gsoc-2020-week-4-cdf6a3ac9ea1

This week I tried out converting several installer scripts to the new TOML format and automate the installer script publishing to the Cloud Storage automated with GitHub Actions.

Most of the installers scripts could be turned in the TOML files without much problem and now they looks very clear and simple. There were some complex scripts where my mentors said I can look into them later.

Then the biggest challenge was to getting GitHub Actions to push the generated installer scripts to cloud. I first used the Firebase GitHub Action as the installer.to project uses Firebase. I got the tokens generated and stored in GitHub repo as a secret with the help of my mentors as I still don’t have access to the Firebase project.

However, after implementing the Firebase GitHub Actions, I realized it is not actually pushing the installer scripts to the storage bucket. Then I did some more reading on this and realized I need the gsutils tool to upload the files to a cloud storage bucket. There was a GitHub Action for this and I again implemented the uploading with gsutils. This tool has a command called rsync which syncs the files from local storage to the cloud storage intelligently. It will only upload the modified files, not all the files!

I had to get the help of my mentors again with this as this GitHub Action needed a GOOGLE_APPLICATION_CREDENTIALS stored in GitHub repo as a secret. This value is a base64 encoded string of a JSON token given by the GCP project. My mentors helped a lot in this part!

Then finally now I have the setup where, with any merge to master branch, it will generate the installer scripts and upload to the storage bucket and also updated the Firebase stuff. We kept the Firebase part for us to keep the Firebase functions and hosting updated with the latest changes also the same way.

Next week I will work on adding improvements to the generator script, we could brainstorm lot of nice ideas to implement. I will add these one by one in the coming weeks.

--

--