{"id":13492222,"url":"https://github.com/vrongmeal/caddygit","last_synced_at":"2025-03-28T09:34:03.327Z","repository":{"id":45177872,"uuid":"255945336","full_name":"vrongmeal/caddygit","owner":"vrongmeal","description":"Git module for Caddy v2","archived":true,"fork":false,"pushed_at":"2024-01-08T07:21:42.000Z","size":105,"stargazers_count":72,"open_issues_count":5,"forks_count":6,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-26T21:48:39.978Z","etag":null,"topics":["caddy","caddy-git","caddy-module","caddy-plugin"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vrongmeal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-04-15T14:39:45.000Z","updated_at":"2025-02-13T19:22:19.000Z","dependencies_parsed_at":"2024-01-22T05:50:05.603Z","dependency_job_id":null,"html_url":"https://github.com/vrongmeal/caddygit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrongmeal%2Fcaddygit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrongmeal%2Fcaddygit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrongmeal%2Fcaddygit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrongmeal%2Fcaddygit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vrongmeal","download_url":"https://codeload.github.com/vrongmeal/caddygit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246004311,"owners_count":20708181,"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":["caddy","caddy-git","caddy-module","caddy-plugin"],"created_at":"2024-07-31T19:01:04.151Z","updated_at":"2025-03-28T09:34:03.020Z","avatar_url":"https://github.com/vrongmeal.png","language":"Go","funding_links":[],"categories":["Go","others"],"sub_categories":[],"readme":"# caddygit\n\n_**NOTE: This repository is no longer maintained. Kindly use [greenpau/caddy-git](https://github.com/greenpau/caddy-git)**_\n\n\u003e Git module for Caddy v2\n\nThe module is helpful in creating git clients that pull from the given\nrepository at regular intervals of time (poll service) or whenever there\nis a change in the repository (webhook service). On a successful pull\nit runs the specified commands to automate deployment.\n\n## Installation\n\nSimply add the following import to\n[`cmd/caddy/main.go`](https://github.com/caddyserver/caddy/blob/master/cmd/caddy/main.go)\nand build the caddy binary:\n\n```go\npackage main\n\nimport (\n\tcaddycmd \"github.com/caddyserver/caddy/v2/cmd\"\n\n\t// plug in Caddy modules here\n\t_ \"github.com/caddyserver/caddy/v2/modules/standard\"\n\t_ \"github.com/vrongmeal/caddygit/module/git\" // Yay!!!\n)\n\nfunc main() {\n\tcaddycmd.Main()\n}\n```\n\n**OR** you can use [xcaddy](https://github.com/caddyserver/xcaddy) to build:\n\n```bash\n$ xcaddy build v2.1.1 \\\n    --with github.com/vrongmeal/caddygit/module/git\n```\n\n## API structure\n\n```jsonc\n{\n    // Your caddy apps.\n    \"apps\": {\n        // Git app module.\n        \"git\": {\n            // Your git clients to be deployed.\n            \"clients\": [\n                // Example client.\n                {\n                    // Git repository info.\n                    \"repo\": {\n                        // HTTP URL of the git repository.\n                        \"url\": \"http://github.com/vrongmeal/caddygit\",\n\n                        // Path to clone the repository in. If path specified\n                        // exists and is a git repository, it simply opens the\n                        // repo. If the path is not a repo and does not exist,\n                        // it creates a repo in that path.\n                        \"path\": \"/path/to/clone\",\n\n                        // Branch (or tag) of the repository to clone. Defaults\n                        // to `master`.\n                        \"branch\": \"my-branch\",\n\n                        // Username and secret for authentication of private\n                        // repositories. If authenticating via access token,\n                        // set the auth_secret equal to the value of access token\n                        // and auth_user can be omitted.\n                        \"auth_user\": \"vrongmeal\",\n                        \"auth_secret\": \"password\",\n\n                        // Specifies whether to clone only the specified branch.\n                        \"single_branch\": true,\n\n                        // Depth of commits to fetch.\n                        \"depth\": 1\n                    },\n                    // Service info.\n                    \"service\": {\n                        // Type of the service.\n                        // Services supported: poll, webhook\n                        \"type\": \"poll\",\n\n                        // Interval after which service will tick.\n                        \"interval\": \"10m\"\n                    },\n                    // Commands to run after every update.\n                    \"commands_after\": [\n                        {\n                            // Command to execute.\n                            \"command\": [\"echo\", \"hello world\"],\n\n                            // Whether to run command in background (async).\n                            // Defaults to false.\n                            \"async\": true\n                        }\n                    ]\n                }\n            ]\n        }\n    }\n}\n```\n\n## TODO:\n\n- [ ] Support for Caddyfile\n- [x] Webhook service\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrongmeal%2Fcaddygit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvrongmeal%2Fcaddygit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrongmeal%2Fcaddygit/lists"}