From: Erik Hubers <2598139-erikhubers@users.noreply.gitlab.com> Date: Sun, 11 Aug 2024 12:52:52 +0000 (+0200) Subject: #2: Build and publish Docker images using GitLab CI. X-Git-Tag: 4.6.1~23^2 X-Git-Url: https://git.p6c8.net/jirafeau/jirafeau.git/commitdiff_plain/ac471fd7432906217f7a2d46b37d49b1c9f512ea?hp=ac471fd7432906217f7a2d46b37d49b1c9f512ea #2: Build and publish Docker images using GitLab CI. --- Add the ability to build & publish a docker image to the Gitlab container registry when tagging a commit. For now we'll publish both tag (i.e. `x.x.x`) and `latest` upon trigger. It's assumed tags are only set on the default branch and only limited amount people have tag rights. As it publishes `latest` it's important not to push breaking / untested releases. If required a more elaborate setup can be created, but let's start somewhere. For now it's assumed in README.md files we're going to publish to the GitLab Container Registry, with $CI_REGISTRY/$CI_REGISTRY_IMAGE variables resolving to `registry.gitlab.com/jirafeau/jirafeau`. Changes: - Fixup of several pre-existing linter errors in `php` files - Cleanup `Dockerfile`, merged `COPY` & `RUN` layers leveraging BuildKit - Added `publish` pipeline step to be triggered using `tags` - Updated docker image related references in `README.md` - Refactored `.gitlab-ci.yaml` to only run `before_script` for linters ---