GitHub Apps
https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app
You have to create three or four types of GitHub Apps.
Webhook App
: GitHub App for webhook server to receive webhook and get data from Main RepositoryTrigger CI Workflow App
: GitHub App for webhook server to trigger CI Repository GitHub Actions WorkflowCI App
: GitHub App for CI Repository GitHub Actions Workflow to access Main Repository- (Optional)
Manual Workflow App
: GitHub App for Manual Workflow Repository to access Main Repository
1. Webhook App
GitHub App for webhook server to receive webhook and get data from Main Repository
- Webhook: Active
- Permissions:
- Issues: Read-only
- To subscribe Issue comment events
- Pull requests: Read and write
- To notify error in webhook server to pull requests
- Issues: Read-only
- Subscribe to events
- Issue comment
- To support slash command such as
/rerun-workflow
- To support slash command such as
- Please subscribe events to trigger workflows
- Issue comment
- Repository access
- Main Repository
- To receive webhook
- Main Repository
caution
To subscribe events, you have to set required permissions.
For example, if you'd like to subscribe push
event, you have to set Contents: Read-only
permission.
2. Trigger CI Workflow App
GitHub App for webhook server to trigger CI Repository GitHub Actions Workflow
- Webhook: Inactive
- Permissions:
- Actions: Read and write
- To run GitHub Actions Workflow
- Actions: Read and write
- Repository access
- CI Repository
- To run GitHub Actions Workflow
- CI Repository
3. CI App
GitHub App for CI Repository GitHub Actions Workflow to access Main Repository
- Webhook: Inactive
- Permissions:
- Commit statuses: Read and write
- To update commit statuses
- Contents: Read-only
- To checkout Main Repository
- Please add permissions for CI
- Commit statuses: Read and write
- Repository access
- Main Repository
- To access Main Repository in CI
- CI Repository
- To issue GitHub App token in CI
- Main Repository
4. Manual Workflow App
GitHub App for Manual Workflow Repository to access Main Repository
- Webhook: Inactive
- Permissions:
- Contents: Read-only
- To checkout Main Repository
- Please add permissions for CI
- Contents: Read-only
- Repository access
- Main Repository
- To access Main Repository in CI
- Manual Workflow Repository
- To issue GitHub App token in CI
- Main Repository