#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