{"id":19637828,"url":"https://github.com/dolejska-daniel/lightweight-git-deployment","last_synced_at":"2026-05-15T13:04:41.134Z","repository":{"id":88083410,"uuid":"352990486","full_name":"dolejska-daniel/lightweight-git-deployment","owner":"dolejska-daniel","description":"Extensible, lightweight and easy to configure webhook processor.","archived":false,"fork":false,"pushed_at":"2021-04-11T16:40:28.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T17:07:26.166Z","etag":null,"topics":["cicd","deployment","github","lightweight","webhook"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dolejska-daniel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-30T12:19:25.000Z","updated_at":"2021-04-11T15:27:42.000Z","dependencies_parsed_at":"2023-05-18T05:00:14.039Z","dependency_job_id":null,"html_url":"https://github.com/dolejska-daniel/lightweight-git-deployment","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolejska-daniel%2Flightweight-git-deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolejska-daniel%2Flightweight-git-deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolejska-daniel%2Flightweight-git-deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolejska-daniel%2Flightweight-git-deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dolejska-daniel","download_url":"https://codeload.github.com/dolejska-daniel/lightweight-git-deployment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240941516,"owners_count":19882063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","deployment","github","lightweight","webhook"],"created_at":"2024-11-11T12:36:18.220Z","updated_at":"2025-10-04T16:25:13.077Z","avatar_url":"https://github.com/dolejska-daniel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lightweight Git Repository Deployment\n\u003e v0.1\n\n## Introduction\nWelcome to this mini-project repository!\nThe aim of this project is to provide **extensible**, **lightweight** and **easy to configure** webhook processor.\nThis implementation allows extremely simple webhook event binding and their processing.\nAutomate anything you want with a _single configuration file_.\n\nThe implementation is highly modular and also allows straightforward implementation of custom Python handler scripts.\n\n## Downloading\nThe easiest way to start is to clone the repository locally and then run it using `pipenv`. \n```shell\n# clone the repository\ngit clone https://github.com/dolejska-daniel/lightweight-git-deployment.git\ncd lightweight-git-deployment\n\n# create local configuration\ncp config/app.dist.yaml config/app.yaml\ncp config/logging.dist.yaml config/logging.yaml\n\n# install dependencies\npipenv install\n```\n\nAfter you have configured all the bindings in the `config/app.yaml` configuration file, start the application by:\n```shell\n./scripts/start.sh\n```\n\n### Requirements\nThis project requires [`Python \u003e= 3.9`](https://www.python.org/downloads/).\nWith [`pipenv`](https://pypi.org/project/pipenv/), the project should be working out-of-the-box.\n\n## Usage\nThe `bindings` key in `config/app.yaml` is of `list[Binding]` type.\n\n**`Binding`**\u003cbr\u003e\nThe `Binding`s are configured by providing corresponding **conditions** and **actions**.\nThe structure is as follows:\n\n| Key          | Type              | Description                                                              |\n|--------------|-------------------|--------------------------------------------------------------------------|\n| `conditions` | `list[Condition]` | Binding conditions determining whether the actions should be run or not. |\n| `actions`    | `list[Action]`    | Binding actions to be run if conditions are met.                         |\n\n**`Condition`**\u003cbr\u003e\nThe `Condition` definition is of `dict[str, Any]` type.\nIts keys refer to fields of the received webhook event.\nIts values refer to the required values of the corresponding event field.\n\n```yaml\n- created: false\n  ref: refs/heads/master\n  repository.full_name: dolejska-daniel/lightweight-git-deployment\n- sender.id: 10078080\n  repository.full_name: dolejska-daniel/lightweight-git-deployment\n```\n\nThis example defines two `Condition`s.\nIf any one of the two is met, the actions are run.\nFor the `Condition` to be met all its rules must evaluate to `true`.\nThe example will run the binding's action iff:\n  - the event is a commit push to repository `dolejska-daniel/lightweight-git-deployment`\n  - the event is sent by user with id `10078080` to repository `dolejska-daniel/lightweight-git-deployment`\n\n**`Action`**\u003cbr\u003e\nThe `Action` object defines which actions are to be run iff the conditions were a match.\nThe structure is as follows:\n\n| Key      | Typ              | Description                                                       |\n|----------|------------------|-------------------------------------------------------------------|\n| `call`   | `str`            | Defines which method from which module should be called.          |\n| `args`   | `list[Any]`      | Defines positional arguments to be supplied to the called method. |\n| `kwargs` | `dict[str, Any]` | Defines keyword arguments to be supplied to the called method.    |\n\n```yaml\n- call: plugin.git.pull\n  args:\n    - /opt/torscraper\n    - origin\n- call: plugin.shell.command\n  args:\n    - make image\n```\n\nThis example defines two `Action`s.\nFirst action will run method `pull` in the `plugin.git` module.\nThis method will perform a `git pull` from provided origin in the given repository.\nThen, the second action is run the same way.\nThe method `plugin.shell.command` simply runs the provided command in a shell. \n\n### Supported Events\n\n#### GitHub Webhooks\n| Name      | Description |\n|-----------|-------------|\n| `create`  | [API Docs](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#create)\n| `delete`  | [API Docs](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#delete)\n| `ping`    | [API Docs](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#ping)\n| `push`    | [API Docs](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#push)\n| `release` | [API Docs](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#release)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolejska-daniel%2Flightweight-git-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdolejska-daniel%2Flightweight-git-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolejska-daniel%2Flightweight-git-deployment/lists"}