admin管理员组

文章数量:1434929

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

本文标签: Communication using Github Actions between two related repositoriesStack Overflow