We use a GitHub App for integration. I explain integration in more detail in the following commits. In story short, user installs our GitHub App to their account and GitHub starts to send workflow job events to our webhook. We create and delete runners based on these webhook events. GitHubInstallation model is used to keep association between installation and project. When new user installed app, GitHub redirects with installation_id to our callback. When new workflow job queued event triggered for this installation, vm will be created in associated project. GitHubRunner model does bookkeeping for created self-hosted runners. A GitHub Action might have multiple jobs. We don't have extra model for workflow or workflow jobs. We keep only runners and assigned job data when they picked a job. Runners are created for jobs, we will create a vm for each runner.
1.0 KiB
1.0 KiB