Skip to content

Using Matrix Strategy results in fast-forward errorsΒ #9

@GerryWilko

Description

@GerryWilko

I'm using this action to pull in data from our content repos and commit into the main repo for building. Seems like a great little action for this.

I have a small issue when using matrix strategy with this action. Essentially the problem is that depending on the order of the execution and timing of the execution of the matrix jobs some will fail with a git fast-forward error. One of the other jobs has pushed to the repo in between. This isn't directly related to matrix strategy and any clashing workflows that perform commits to their repos will be affected here.

There are a few possible fixes non of which are perfect so I'm not sure this is necessarily a solvable problem:

  • Do a git pull before git push (this will reduce the chance of this error occurring but not solve it)
  • Handle the git push fast-forward error and repeat operation up to say 5 times (e.g. pull then push, pull then push, ...)
  • Some other magical fix which essentially does a pull push in one operation which I'm not aware exists πŸ˜„

I'm more than happy to raise a PR to sort this but just wanted to see which one was preferable from the maintainers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions