Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.93 KB

README.md

File metadata and controls

39 lines (28 loc) · 1.93 KB

egeoffrey-actions

A collection of supporting Github Actions for eGeoffrey.

Build Action (build.yml)

This workflow is triggered at every push and pull-request and automate the process of:

  1. Testing an eGeoffrey module code
  2. Packaging it in a Docker image
  3. Publishing it to Dockerhub for distribution

How to use it

  • Create a DockerHub account
  • Create a DockerHub Access Token
  • In the Github repository where your eGeoffrey package resides, go to "Settings", "Secrets" and create a secret called DOCKERHUB_USERNAME storing your DockerHub username and DOCKERHUB_TOKEN storing your DockerHub access code
  • Commit your code as you would normally do with egeoffrey-cli commit "new change". The egeoffrey-cli utility will automatically download and keep up to date the workflow file in your repository
  • As the new version is committed and pushed to your repository, the build workflow automatically triggers. You can see the result of the execution under "Actions". In case of failure, you will receive an email notification
  • If everything goes well, the eGeoffrey package is automatically built and pushed to your DockerHub repository

How it works

Every time egeoffrey-cli commit is run, it will download the latest version of this GitHub Action workflow and deploy it in your local repository, just before committing the changes and pushing them to GitHub. This makes the workflow trigerring as the new code is pushed to GitHub.

The worklof does the following:

  1. Starts up a virtual image
  2. Checkout the latest version of the code
  3. Login to DockerHub
  4. Setup Docker for cross-platform building
  5. Install eGeoffrey
  6. Build your eGeoffrey Package
  7. Install your package
  8. Wait a few seconds for collecting enough logs
  9. Check if there are no errors showing up in the logs
  10. Push the eGeoffrey Package to DockerHub

If any of the above steps fails, the entire workflows fails.