I also faced the same issue, even after providing all the Secrets and variables in github Action settings. I am able to build docker image , but not able to push it
I found out after analysis that it's because of permission issue in AWS.
So I went to
AWS--IAM -- Users -- Permissions-- then add --AmazonEC2ContainerRegisteryFullAccess.
It will resolve the issue