Seeking for guidance - commit to repoA creates a branch from RepoB and makes a PR to RepoB #26085
-
Hi, I am new to Github Action and looking for guidance. We have a requirement: Repo A repoA stores a template file committing to Repo A shall trigger action that:
Could I have some guidance if this is possible and how to start? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
jasontsaitks:
Could you clarify what you mean by this? Do you want to automatically mirror branches from A to B, without any pull request? |
Beta Was this translation helpful? Give feedback.
-
thanks for the reply. repoA stores a template file Repo A’s action shall
|
Beta Was this translation helpful? Give feedback.
-
This is a rough outline of how you could design the workflow. Note that you need to use a This workflow goes in repo-a:
If you prefer, instead of using |
Beta Was this translation helpful? Give feedback.
-
thank you. It is so detailed. |
Beta Was this translation helpful? Give feedback.
-
Now I am thinking again…I wonder if I shall checkout repoB at the first place since repoA generates the new artifact and it will be sent to repoB in PR? I am considering a scenario where:
Thanks |
Beta Was this translation helpful? Give feedback.
-
You will need to checkout repo B to work with it. If it contains artifacts you don’t want any more you’ll have to delete them, like when working with git locally. If you want only the files from the artifact you can simply do something like
to delete all of them. I’m not familiar with the |
Beta Was this translation helpful? Give feedback.
-
thank you for the reply. I end up:
In the workflow:
|
Beta Was this translation helpful? Give feedback.
This is a rough outline of how you could design the workflow. Note that you need to use a
repo
scoped Personal Access Token to create the pull request in a remote repository.This workflow goes in repo-a: