GH actions and docker fixes and refactor #302
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pin VSCode Server version in VNC image due to incompatilibities in newer versions (cpp tools and ros extensions specifically cannot be installed to vscode server during image build).
Previously, the build and push job constitued of two parametrized jobs that were taking from the same template to build base and dependent vnc image. The .yml files themselves were somewhat convoluted and contained custom logic that should be unnecessary. Since buildx was already used in workflows, no reason not to use its really good features, like bake. Also, buildx has been installed by default since docker v23.0, and current is v27, so really, there is no reason not to use it, hence changes in the Makefile too (also left previous build logic as fallback).
The convoluted logic of evaluating tags and targets manually, then passing them around to build and push jobs has been completely moved to docker-bake.hcl, which is way more extendable, and also can be used for both local and remote use. This also removes 2 .yml files which were dependent on each other, and instead makes the CI part of the system clean and simple. In addition, the job that actually builds the images will run faster now, as it is not explicitly sequential as before (basically, think that vnc job is now in some form of hot start mode, as it is not separated, so it can prepare its dependencies that are not dependent on the upstream image, same goes for new deploy image)