ci: Use eclipse-mosquitto image instead of custom #147
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.
A fundamental problem with service containers in GitHub Actions is that containers are started before the repository is checked out. This means that any configuration for the service that exists in the repo cannot simply be provided to the service container as volume mounts. 1
The custom mqttnio-mosquitto image solved this problem by pre-populating the mosquitto configuration from the mqtt-nio repo such that the container could be run in CI without needing access to the mqtt-nio checkout.
But this leaves the problem of having to manually keep the custom mqttnio-mosquitto image updated with any changes in the repo.
A workaround for containers starting before checkouts is to add an explicit container restart step after the checkout step.
Using this workaround allows CI to use the upstream/canonical eclipse-mosquitto image instead of a custom image. The mosquitto configuration from the repo is thus always up to date and no manual image build/push is required.