CI: Introduce 2 stages: Prepare image, build the source & upload artifacts
I've analysed the forum question and forked the repository to dive deeper into the build error.
Here's some things I have now adopted from these findings:
- Fixing the make command is not the right approach, since the command is executed in the wrong context.
- 2 stages are needed:
- First, build the container image and push it to the registry
- Second, pull the image and run a container with it, build the source in there
- The path logic with
cdinside the build script needed fixes. I've also renamed
build.shto have a better name.
- The generated artifacts were not uploaded, I have now added an example for
thermo/*.bin. Reverse engineering Makefiles is not fun ;-)
The provided Dockerfile is awesome, and ready to use.