最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Communication using Github Actions between two related repositories - Stack Overflow

matteradmin2PV0评论

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

Post a comment

comment list (0)

  1. No comments so far