https://github.com/status-im/infra-role-github-webhook
Ansible role for GitHub webhook handler
https://github.com/status-im/infra-role-github-webhook
ansible-role git github infra webhook
Last synced: about 2 months ago
JSON representation
Ansible role for GitHub webhook handler
- Host: GitHub
- URL: https://github.com/status-im/infra-role-github-webhook
- Owner: status-im
- Created: 2023-05-30T09:35:48.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-19T11:39:29.000Z (over 1 year ago)
- Last Synced: 2025-02-22T17:43:26.355Z (over 1 year ago)
- Topics: ansible-role, git, github, infra, webhook
- Language: Python
- Homepage: https://docs.github.com/en/webhooks/about-webhooks
- Size: 45.9 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Description
This is a helper role that deploy a python server for github webhook
# Configuration
Required configuration:
```yaml
github_webhook_dest_path: '/opt/repo'
github_webhook_secret: 'super-secret-webhook-secret'
github_webhook_repo_url: 'https://github.com/example-org/example-repo'
github_webhook_repo_branch: 'master'
github_webhook_post_command: 'echo "update repo"'
```
The user and group creation can be deactivated:
```yaml
github_webhook_create_user_and_group: False
```
Additionally these options can be useful:
```yaml
github_webhook_ssh_key: '-----BEGIN OPENSSH PRIVATE KEY-----\n...'
github_webhook_service_user: 'repouser'
github_webhook_user_additional_groups: ['docker']
github_webhook_service_user_uid: 1500
github_webhook_instances:
- 'node-01.do-ams3.proxy.test'
- 'node-02.do-ams3.proxy.test'
```
Explanations:
* `github_webhook_dest_path` - Absolute path for repository location.
* `github_webhook_secret` - Used to configure the webhook in GitHub repository.
* `github_webhook_ssh_key` - Optional private SSH key to checkout private repositories.
* `github_webhook_service_user` - Define user to own the repo and run the service.
* `github_wehbook_service_user_groups` - Modify list of groups of service user.
* `github_webhook_service_user_uid` - Change UID of service user to match repo user.
* `github_webhook_post_command` - Command to execute after webhook request is received.
* `github_webhook_instances` - List of all webhook instances the webhook request should go to.