roundcube / roundcubemail-docker

Resources to build Docker images for Roundcube Webmail
290 stars 129 forks source link

Automation #93

Closed robin-thoni closed 2 days ago

robin-thoni commented 4 years ago

New issue to talk about automation, as started in #92.

I had a quick look, and using the Builds tab on Docker Hub sounds the easiest way to achieve automatic builds:

(Done with https://github.com/robin-thoni/roundcubemail-docker and https://hub.docker.com/r/robinthoni/roundcube)

image

image

This is very straight forward: just a few clicks to set it up on Docker Hub (no action required on GitHub if you link your account with Docker Hub), then you just push, and Docker Hub will build for you.

Under the hood, Docker Hub will create a Webhook and add a public key to the repo in order to get push events and clone the project (not really sure why the key is required for a public repo though)

Does that help?

thomascube commented 4 years ago

This is what we already have set up. So committing to this repo or pushing tags (if not forgotten) automatically triggers builds on Docker Hub.

What's missing in terms of a full automation is the connection between publishing a new releases on the roundcube/roundcubemail repo and updates to this repo (-> which again trigger Docker builds).

So this is what's currently being done by hand whenever a new Roundcube release is published:

There are according hooks on Github to get notified when new releases are published. What's missing is a script running somewhere reachable by a webhook that executes the above steps and is privileged to push to this repo. Any ideas on this?

thomascube commented 4 years ago

Looking into Github Actions for this. From the introduction, this could help us adding the missing piece of automation for new Docker releases.

robin-thoni commented 4 years ago

Oh sorry, I forgot about this... Yeah, Github Actions and Docker Hub builds were the pieces I looked at. For a simple workflow, Docker Hub builds are much easier. However, in that case, adding an Action on the main repo to trigger a Docker Hub build sounds the way to go: image

Basically, you set a name in the Build triggers section on the Docker Hub build tab, and you send a post request on the provided URL when the main repo gets updated. Does it make sense?

dkowis commented 3 years ago

https://github.com/peter-evans/repository-dispatch

Repository dispatch action might help. This way, the primary roundcube repo would trigger an action on this repowhen the release is created. Found here.

pabzm commented 2 days ago

Closing this since automation works these days