{"id":40991240,"url":"https://github.com/andresterba/upstream-watch","last_synced_at":"2026-01-22T07:40:21.263Z","repository":{"id":37829293,"uuid":"503095656","full_name":"andresterba/upstream-watch","owner":"andresterba","description":"git-ops tool to monitor an upstream repository and execute update hooks if necessary","archived":false,"fork":false,"pushed_at":"2025-04-03T05:47:42.000Z","size":54,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T06:33:28.182Z","etag":null,"topics":["git-ops","gitops","go","infrastructure-management"],"latest_commit_sha":null,"homepage":"","language":"Go","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/andresterba.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":"2022-06-13T19:53:19.000Z","updated_at":"2025-04-03T05:47:40.000Z","dependencies_parsed_at":"2024-04-24T04:39:22.141Z","dependency_job_id":"0a280639-dccd-48ff-acf8-10805a9f310e","html_url":"https://github.com/andresterba/upstream-watch","commit_stats":{"total_commits":23,"total_committers":4,"mean_commits":5.75,"dds":0.4347826086956522,"last_synced_commit":"c477b5166b505a10b05db7410c26e313499bdb84"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/andresterba/upstream-watch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresterba%2Fupstream-watch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresterba%2Fupstream-watch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresterba%2Fupstream-watch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresterba%2Fupstream-watch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andresterba","download_url":"https://codeload.github.com/andresterba/upstream-watch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andresterba%2Fupstream-watch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28658114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["git-ops","gitops","go","infrastructure-management"],"created_at":"2026-01-22T07:40:21.194Z","updated_at":"2026-01-22T07:40:21.244Z","avatar_url":"https://github.com/andresterba.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# upstream-watch\n\n`upstream-watch` is a git-ops tool to monitor an upstream repository and execute update steps if necessary.\nIt only supports `git`.\n\nI wrote this tool to support my personal container infrastructure, which is completely managed via a single\ngit repository.\nThere are two different modes:\n\n- single directory\n- Subdiretorie per service\n\n## Single directory\n\nThe target repository could look like this:\n\n```sh\n    .\n    ├── .upstream-watch.yaml\n    ├── README.md\n    ├── .update-hooks.yaml\n    ├── docker-compose.yml\n    └── upstream-watch\n```\n\nAll configuration files are in a single directory, which must be the root of the git directory.\nUse this mode by setting `single_directory_mode: true`.\nThe rest of the needed configuration is identical to the subdirectory documentation.\n\n## Use subdirectories for different services\n\nThe target repository could look like this:\n\n```sh\n    .\n    ├── .upstream-watch.yaml\n    ├── README.md\n    ├── service-1\n    │   ├── .update-hooks.yaml\n    │   ├── docker-compose.yml\n    │   └── README.md\n    ├── service-2\n    │   ├── .update-hooks.yaml\n    │   ├── docker-compose.yml\n    │   └── README.md\n    └── upstream-watch\n```\n\nThe `.upstream-watch.yaml` is the main configuration file for this instance of `upstream-watch`.\nYou can set the retry interval (in seconds) and folders that should be ignored.\n\n```sh\n    single_directory_mode: false\n    retry_interval: 10\n    ignore_folders: [\".git\", \".test\"]\n```\n\nThere are two services, each in its own subfolder.\nEach of these services holds a `README.md` (which is not interesting), a `docker-compose.yml` that defines\nthe containers and a `.update-hooks.yaml`, which is the configuration file of `upstream-watch` for this specific service.\n\nIn case of an update to any of these files in a subfolder, `upstream-watch` will execute the pre- and post-hooks\ndefined in the corresponding `.update-hooks.yaml`.\n\nAn example for a `.update-hooks.yaml`:\n\n```sh\n\tpre_update_commands: [\"docker compose down\"]\n\tupdate_commands: [\"docker compose pull\"]\n\tpost_update_commands: [\"docker compose up -d\"]\n```\n\n`upstream-watch` will stop all containers, pull updates from the registry and start them afterwards.\nOf course, you can do almost anything in these hooks, depending on the needs of your service.\n\n### Requirements on the server\n\n* Pull access to upstream repository\n* `git` installed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandresterba%2Fupstream-watch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandresterba%2Fupstream-watch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandresterba%2Fupstream-watch/lists"}