Linting currently runs in the GitHub ubuntu environment. It may not be using the same environment built as a container.
Use a multi-stage container, one base container, one with the base plus the testing/linting tools, and then test in that.
Only push when the code/container is validated.