Communication using Github Actions between two related repositories - Stack Overflow

I'm looking for a way to use Github Actions and establish communication between two repositories t

I'm looking for a way to use Github Actions and establish communication between two repositories that are related to each other. I need help since I have never done this. The logic would be like this:

Repo A needs to deploy to some Cloud cloud (AWS, GCP, Azure, etc.), based on functional requirements that need to be fulfilled. But it does not have that code logic or the necessary parameters to execute that deploy, that is what Repo B is for. ** Github Actions would come in here **

Repo B if it has this code logic and parameters necessary to be able to make this deploy request, then it occupies Github Actions??? in some efficient and precise way. Capturing repo A requirements.

Repo B performs the action and reports the incident if it was satisfactory or if there were errors. The success or error message is reported to repo A, for adjustments and further testing.

Has anyone already done this before? What would be the most efficient way to do it? And the most correct? I spent hours with ChatGPT but I had no success.

Thank you!

I'm looking for a way to use Github Actions and establish communication between two repositories that are related to each other. I need help since I have never done this. The logic would be like this:

Repo A needs to deploy to some Cloud cloud (AWS, GCP, Azure, etc.), based on functional requirements that need to be fulfilled. But it does not have that code logic or the necessary parameters to execute that deploy, that is what Repo B is for. ** Github Actions would come in here **

Repo B if it has this code logic and parameters necessary to be able to make this deploy request, then it occupies Github Actions??? in some efficient and precise way. Capturing repo A requirements.

Repo B performs the action and reports the incident if it was satisfactory or if there were errors. The success or error message is reported to repo A, for adjustments and further testing.

Has anyone already done this before? What would be the most efficient way to do it? And the most correct? I spent hours with ChatGPT but I had no success.

Thank you!

Share Improve this question asked Nov 17, 2024 at 17:20 Matias GonzalezMatias Gonzalez 1851 gold badge1 silver badge8 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

I would suggest going with submodules or subtrees to have a common checkout with both codebases in one place. You can either create a separate orchestrator repository or just use the one you have already.

It will allow you to have a centralize control on all GitHub workflow runs - cancel them if needed and handle errors easier.

Sounds like you are looking to checkout multiple repositories into your workspace. Here is how you can do that in your workflow:

- name: Checkout current repository (repo A)
  uses: actions/checkout@v4
  with:
    path: repo-a 

- name: Checkout secondary repository (repo B)
  uses: actions/checkout@v4
  with:
    repository: your-/your-repo
    path: repo-b

From here you will have all of your code in your workspace and the code from each repo can interact with each other

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745629684a4637029.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信