Mark the repository as safe.
It should be ok to do so in the action context because the vulnerability affects "multi-user shared machines" and this is a single-user Docker image. Details of why this is needed CVE-2022-24765: https://github.blog/2022-04-12-git-security-vulnerability-announced/
I will keep monitoring if there could be any problems and get in touch in you have more information.