{"id":22287390,"url":"https://github.com/fooker/pullomatic","last_synced_at":"2025-07-28T22:32:05.000Z","repository":{"id":138425992,"uuid":"133813771","full_name":"fooker/pullomatic","owner":"fooker","description":"Automated git pulls","archived":false,"fork":false,"pushed_at":"2023-10-19T20:41:11.000Z","size":71,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-10-20T03:26:00.461Z","etag":null,"topics":["automation","git","linux","trigger","webhook"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fooker.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}},"created_at":"2018-05-17T12:58:51.000Z","updated_at":"2021-10-15T21:36:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7da807f-a0ef-4b5b-a577-790f01615e43","html_url":"https://github.com/fooker/pullomatic","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooker%2Fpullomatic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooker%2Fpullomatic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooker%2Fpullomatic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fooker%2Fpullomatic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fooker","download_url":"https://codeload.github.com/fooker/pullomatic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227961823,"owners_count":17847838,"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":["automation","git","linux","trigger","webhook"],"created_at":"2024-12-03T16:59:54.258Z","updated_at":"2024-12-03T16:59:54.395Z","avatar_url":"https://github.com/fooker.png","language":"Rust","readme":"`pullomatic` automates GIT repository synchronisation.\n\n[![Build Status](https://travis-ci.org/fooker/pullomatic.svg?branch=master)](https://travis-ci.org/fooker/pullomatic)\n\nStoring configuration or other application data in a GIT repository is a common practice.\nUsually custom scripts are used to pull updates from remote from time to time.\n`pullomatic` replaces these scripts with pure configuration.\n\nBeside the polling interval, `pullomatic` provides a HTTP endpoint which can be used to trigger updates by web-hooks.\n\nWhenever a change is detected in the remote repository branch, the new branch head will be checked out to the path.\n\n\n## Features\n\n* One configuration file per repository allowing for easy deployment\n* Automatically creates target directory with initial clone\n* Runs as daemon and checks repositories by interval without cron / timers\n* Can be target for Webhooks supporting [github](https://developer.github.com/webhooks/), [gitlab](https://docs.gitlab.com/ee/user/project/integrations/webhooks.html) and others\n* Inline configuration of SSH deploy-keys and credentials \n* Executes scripts and commands after updates\n\n\n## Build\n\nTo build, the following requirements must be installed:\n* [rustc](https://www.rust-lang.org) \u003e= 1.25\n* [cargo](https://github.com/rust-lang/cargo) \u003e= 0.25\n\nAfter downloading the sources. the following command is used to build:\n```bash\ncargo build --release\n```\n\nThe resulting binary will be placed in `target/release/pullomatic`.\n\n\n## Configuration\n\nEach repository is configured in a single file which must be placed inside `/etc/pullomatic/`.\nThe filename is used as repository name and must be formatted as YAML file.\n\nThe configuration must contain a `path` which specifies the path where the repository lives locally.\nOn startup, the existence of the repository will checked.\nIf the repository does not exists, the remote repository will be cloned to that path.\nSecond, the config must contain a `remote_url` and a `remote_branch` which specifies the remote URL of the GIT repository and the branch to check out.\n\n### Credentials\nThe configuration can contain a `credentials` section depending on the transport type used to connect to the remote GIT server.\n\nUsually, the `remote_url` contains a username if one is required to authenticate.\nAs a fallback, a `username` can be specified in this section.\n\nIf the SSH or HTTP(S) transport is used, the section can contain a `password` which is used to authenticate agains the remote server.\n\nFor SSH, a key pair can be used as an alternative.\nTherefore, a `private_key` must be specified containing the SSH private key (as generated by `ssh-keygen`).\nAdditionally, a `passphrase` can be specified which is used to unlock the key.\nIf a `public_key` is given, it will not be derived from the private key, but the given one will be used.\n\n### Interval\nThe check the repository regularly for changes, the configuration can contain a `interval` section.\nIf this section is present, it must contain a `interval` parameter, which specifies the interval to poll for changes.\nThe format of this option allows to specify the interval in multiple ways like `30sec` or `5m` (See [here](https://docs.rs/humantime/1.1.1/humantime/fn.parse_duration.html) for more details).\n\n### Webhook\nTo make updates as instant as possible, webhooks can be used to trigger update checks.\nThe `webhook` section can be used to enable webhook support.\nIf webhook is enabled in at least one repository, `pullomatic` will listen for incoming HTTP `POST` requests.\n\nThe `provider` parameter must be set to enable support for one of the following supported  services:\n\n| Provider | Config Value | Remarks |\n| -------- | ------------ | ------- |\n| GitHub   | `github`     | Only `push` events are supported |\n| GitLab   | `gitlab`     | Only `push` events are supported |\n| Plain    | `plain`      ||\n \n#### GitHub\nIf the GitHub provider is selected, a `secret` parameter can be given.\nThe same value must be configured in the GitHub webhook configuration.\n \nThe `check_branch` parameter controls if the branch in the event must match the `remote_branch` of the repository configuration (enabled by default).\n\n#### GitLab\nIf the GitLab provider is selected, a `token` parameter can be given.\nThe same value must be configured in the GitLab webhook configuration.\n  \nThe `check_branch` parameter controls if the branch in the event must match the `remote_branch` of the repository configuration (enabled by default).\n\n#### Plain\nIf The Plain provider is selected, every `POST` request will trigger an update check. \n \n\n### Script\nEach configuration can include a `on_change` hook option which allows to specify a script which is executed every time the repository has changed.\nThe script is executed right after the updates has been checked out.\nIt will be started with the working directory set to the local repository path.\n\nThe script is executed using `sh -c` and therefor it can contain arbitrary shell commands over multiple lines.\nBuf for complex scripts, it is recommended to store the script externally (maybe in the repository itself) and just call the script inside the hook.\n\n### Overview\nThe following options are allowed in the configuration:\n\n| Option | Type | Required | Description |\n| ------ | ---- | -------- |----------- |\n| `path` | `str` | ✓ | Path to the GIT repository on disk |\n| `remote_url` | `str` | ✓ | Remote URL of the GIT repository to pull changes from |\n| `remote_branch` | `str` | ✓ | The branch to check out and pull changes from |\n| `credentials.username` | `str` | | The username to use if none is given by `remote_url` |\n| `credentials.password` | `str` | (✓) | The password used to authenticate (required for password authentication) |\n| `credentials.private_key` | `str` | (✓) | The private SSH key used to authenticate (required for SSH authentication) |\n| `credentials.public_key` | `str` | | The public SSH key matching the private SSH key |\n| `credentials.passphrase` | `str` | | The passphrase used to unlock the private SSH KEY|\n| `interval.interval` | `str` | | The interval used to check the remote GIT repository for updates |\n| `webhook.provider` | `str` | | Can be one of `github`, `gitlab` or `plain` |\n| `webhook.secret` | `str` | | Secret used to authenitcate GitLab webhook events (only valid for provider `github`) |\n| `webhook.token` | `str` | | Secret used to authenitcate GitLab webhook events (only valid for provider `gitlab`) |\n| `webhook.check_branch` | `bool` | | Checks if the event branch matches `remote_branch` (only valid for provider `github` or `gitlab`) |\n| `on_change` | `str` | | A script executed every time the repository has changed |\n\n\n## Running\n\nJust execute the `pullomatic` binary.\n\nThe configuration path can be changed by using `-c PATH` or `--config PATH`.\nIf webhooks are used, the listening address can be changed using `-w ADDR:PORT` or `--webhook-listen ADDR:PORT` (defaults to `locahost:8000`).\n\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/fooker/pullomatic/tags). \n\n\n## Authors\n\n* **Dustin Frisch** - *Initial work* - [Dustin Frisch](https://github.com/fooker)\n\nSee also the list of [contributors](https://github.com/fooker/pullomatic/contributors) who participated in this project.\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooker%2Fpullomatic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffooker%2Fpullomatic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffooker%2Fpullomatic/lists"}