This PR does a few things at the same time, and solves a few bugs, all of them reported in #85.
Push all tags
It pushes all image tags instead of pushing just latest. This was working fine for the decidim/decidim image, but not for the other ones, so tags were missing.
Add a missing build argument
It adds a missing decidim_version build argument to the test image. This caused the wrong Decidim version to be installed.
Fix an image-dependency bug
The bug appeared when running the Docker Hub workflow before running the GitHub Registry one: The main decidim/decidim image uses the GitHub Registry version of the decidim/decidim-generator image. The image could be overwritten via a build argument, but it was not being set. If the Docker Hub workflow ran before the GitHub Registry one, it caused the main image to build on top of an outdated generator image.
By joining the two workflows we make sure that the image is always up to date.
Specify the base image version to build from
I made the builds use a explicit base image, using the $TAG version of the image (the one matching the latest commit SHA in Decidim). This makes the build idempotents, and we make sure we're using the correct SHA (in case something happens with the latest tag).
Note that 0a230df976b1bc0033813191565c580051118950 reverted part of this PR: I had to leave the arguments as they originally weere, otherwise everything failed.
This PR does a few things at the same time, and solves a few bugs, all of them reported in #85.
Push all tags
It pushes all image tags instead of pushing just
latest
. This was working fine for thedecidim/decidim
image, but not for the other ones, so tags were missing.Add a missing build argument
It adds a missing
decidim_version
build argument to the test image. This caused the wrong Decidim version to be installed.Fix an image-dependency bug
The bug appeared when running the Docker Hub workflow before running the GitHub Registry one: The main
decidim/decidim
image uses the GitHub Registry version of thedecidim/decidim-generator
image. The image could be overwritten via a build argument, but it was not being set. If the Docker Hub workflow ran before the GitHub Registry one, it caused the main image to build on top of an outdated generator image.By joining the two workflows we make sure that the image is always up to date.
Specify the base image version to build from
I made the builds use a explicit base image, using the
$TAG
version of the image (the one matching the latest commit SHA in Decidim). This makes the build idempotents, and we make sure we're using the correct SHA (in case something happens with thelatest
tag).