On my CI, I want to build a docker image once and then use the same image twice (or multiple times) for any following jobs, such as "test" and "lint".
╭─────────────╮
│ build-image │
╰─────────────╯
⬇
╭──────╮ ╭──────╮
│ test │ │ lint │
╰──────╯ ╰──────╯
It is possible to use a custom container using the container attribute. However, I'm unsure of how to make the image built in the "build-image" step accessible to that property.
What's the best approach to building an image and using it in the following jobs?