I have a repository https://github.com/Gitauwairimu/ghjavamvn.git whose github actions workflow builds and pushes a docker image. It also checkouts another repo https://github.com/Gitauwairimu/GitOps--ghjavamvn.git and successfully updates a file base/base/deployment.yaml with the new image. How can this changes be pushed back to the repo https://github.com/Gitauwairimu/GitOps--ghjavamvn.git using git?
Am using:
git config user.name "me"
git config user.email "xxxx@gmail.com"
git add base/deployment.yaml
git commit -m 'updated k8s manifest image version'
git push https://${{ secrets.k8s_REPO_UPDATE }}@github.com/Gitauwairimu/GitOps--ghjavamvn.git
git push origin main
Its not working. The issue seems to be the second last command.