gdgpescara / hedwig

Other
21 stars 12 forks source link

BO03 - Create a client to Github API to programmatically call the deployment workflow #124

Open gregoriopalama opened 8 months ago

gregoriopalama commented 8 months ago

Create a client for the Github API. It may be that there are already available libraries for this. We should investigate further. The client should only be able to perform one call, to make the deployment workflow run. Maybe we could customize the deployment workflow, to automatically inject the name of the workflow when it compiles the project? Also, documentation must be updated, to explain how to update the repository's secrets, adding the token that will be used by the client.

This is the Github reference.

Depends on #149

gregoriopalama commented 6 months ago

Octokit is the official SDK. This issue should be solved creating a service that will internally expose an API that will just use Octokit to trigger the workflow. As for now, the only workflow that should be triggered is the Cloud Run one. The Firebase Functions don't need to be re-deployed upon a content editing

giacomoRanieri commented 3 months ago

Create a client for the Github API. It may be that there are already available libraries for this. We should investigate further. The client should only be able to perform one call, to make the deployment workflow run. Maybe we could customize the deployment workflow, to automatically inject the name of the workflow when it compiles the project? Also, documentation must be updated, to explain how to update the repository's secrets, adding the token that will be used by the client.

This is the Github reference.

Depends on #149

May I suggest to save part of the configuration on firestore? Each admin user may save a personal access token in it's account so that is well know who has triggered the action. Instead the injection of the workflow, owner, repos, ref(branch/tag), could be injected as suggested during the deploy workflow.