Failing a PR based on testing it against a container

I have GL setup to use CI to spin up a docker container and check the status of the config I want to push. This however takes place after the PR is submitted for approval in CI. Is there any way to test this as the PR get submitted, NOT through CI? So it would basically check the config before merging the PR and kick back to the user if there is a problem.