Pulling data from private repo for Action #26619
-
Hey, so I’m pretty new to Actions, and I’ve been trying to set up a webhook for my projects, where a specific repository is automatically built alongside its’ dependencies and then sent to my testers (via email or Discord). I’ve set up the appropriate actions in the dependency repos and in the main one, but I’ve been thinking: since the dependency repositories won’t need to be built on their own without the main one, would it be possible to do it all in the main repository’s action (for example, when building aridai-shi/repoA, can I include a job to build aridai-shi/repoB without having a github actions workflow in repoB)? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Technically it’s possible, but for private dependency repositories you’d need to add a PAT for authentication as a secret and use it when pulling the dependencies, because That said, wouldn’t it be better to build the dependencies when they change themselves, and then pull in build or release artifacts, or packages, during the build of your main project? |
Beta Was this translation helpful? Give feedback.
-
I suppose I’ll leave it as is then. Thanks for the response. |
Beta Was this translation helpful? Give feedback.
-
I want to pull data from public repo for action and see how I can work on the repo and platform. If any one can suggest the way it will be very helpful. |
Beta Was this translation helpful? Give feedback.
-
You don’t need authentication to read public repositories, so you can just clone them in your workflow, or better use |
Beta Was this translation helpful? Give feedback.
Technically it’s possible, but for private dependency repositories you’d need to add a PAT for authentication as a secret and use it when pulling the dependencies, because
GITHUB_TOKEN
grants access only to the repository being built.That said, wouldn’t it be better to build the dependencies when they change themselves, and then pull in build or release artifacts, or packages, during the build of your main project?