When I push to the dev branch, Actions job starts and produces Docker image and modified Kustomize (Kubernetes project) manifests which I want to promote to staging branch.
In my current iteration of the workflow file, I get merge conflicts and I’m unsure on how to do this properly.
I tried the following:
- git stash
- git checkout staging
- git checkout stash – .
- git commit -am “$COMMIT_MESSAGE”
- git push origin staging
This somewhat works but it’s messy (e.g. it doesn’t delete stuff in the staging branch, just adds to it) for obvious reasons.
Is there a proper merge/rebase command that allows me to move all edited files to the staging branch without conflicts?