Generate code into another repository on each push/pr close, remove remote branch on PR close #25018
-
2 repositories, org/proto and org/proto-elixir. When protobuf definitions are pushed to an org/proto branch/PR, the protoc compiler is executed (with an Elixir plugin) and the resulting code is committed and pushed to a branch with the same name in org/proto-elixir. When the PR is closed, the generated code is committed and pushed to master in org/proto-elixir. We have two workflows, each configured to handle a different event, my understanding is that there’s no way to make them run sequentially, they are just kicked off when the receive and event.
So, everything works correctly, apart from removing the feature branch in org/proto-elixir when the PR is merged/closed.
But… when executed I’m getting the following error:
I’m guessing it’s because the checkout happens concurrently in both the workflows ‘CI (PR close)’ and ‘CI (PR push)’ or maybe I’m totally missing something. In any event it’s a brittle workflow, could I get some feedback please, perhaps someone else has attempted something similar before? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Resolved :
also - I wish this forum supported markdown - is the great stuff programmers love |
Beta Was this translation helpful? Give feedback.
Resolved :
Changed last command to :
also - I wish this forum supported markdown - is the great stuff programmers love