Skip to content

Commit same changes on multiple branches #221

Answered by stefanzweifel
zaniluca asked this question in Help
Discussion options

You must be logged in to vote

There is no secret setting in git-auto-commit to make this workflow possible. But I see 2 ways to solve your problem:

  1. Have 2 identical jobs in your workflows that bump buildNumber. One job pushes the changes to master the other to production.
  2. Have 1 job in your workflow but instead of running git-auto-commit-action twice, the second step cherry picks the commit from one branch to the other.

The workflow for solution 2 would look something like this. (Haven't tested this on GitHub Actions, but should work as it's just a chain of basic git commands)

  - name: Bump build and tag on master
    uses: stefanzweifel/git-auto-commit-action@v4
+   id: auto_commit
    with:
      branch: master
 …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zaniluca
Comment options

@stefanzweifel
Comment options

Answer selected by zaniluca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants