{"id":15364118,"url":"https://github.com/psidex/crowsnest","last_synced_at":"2025-04-15T07:31:01.562Z","repository":{"id":47732735,"uuid":"395127328","full_name":"psidex/CrowsNest","owner":"psidex","description":"Watchtower for Git: automatically keep local Git repositories up to date with their remotes","archived":false,"fork":false,"pushed_at":"2021-08-20T13:11:33.000Z","size":105,"stargazers_count":62,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T18:14:55.863Z","etag":null,"topics":["automation","continous-delivery","devops","ouroboros","update-checker","watchtower"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/repository/docker/psidex/crowsnest","language":"Go","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/psidex.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}},"created_at":"2021-08-11T22:07:03.000Z","updated_at":"2025-01-18T05:23:33.000Z","dependencies_parsed_at":"2022-08-22T23:00:38.801Z","dependency_job_id":null,"html_url":"https://github.com/psidex/CrowsNest","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psidex%2FCrowsNest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psidex%2FCrowsNest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psidex%2FCrowsNest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psidex%2FCrowsNest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psidex","download_url":"https://codeload.github.com/psidex/CrowsNest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249026708,"owners_count":21200494,"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","continous-delivery","devops","ouroboros","update-checker","watchtower"],"created_at":"2024-10-01T13:10:03.817Z","updated_at":"2025-04-15T07:31:01.260Z","avatar_url":"https://github.com/psidex.png","language":"Go","readme":"# CrowsNest\n\n[![MainCI](https://github.com/psidex/CrowsNest/actions/workflows/mainci.yml/badge.svg)](https://github.com/psidex/CrowsNest/actions/workflows/mainci.yml)\n[![ReleaseCI](https://github.com/psidex/CrowsNest/actions/workflows/releaseci.yml/badge.svg)](https://github.com/psidex/CrowsNest/actions/workflows/releaseci.yml)\n[![Docker Pulls](https://img.shields.io/docker/pulls/psidex/crowsnest)](https://hub.docker.com/repository/docker/psidex/crowsnest)\n[![Go Report Card](https://goreportcard.com/badge/github.com/psidex/CrowsNest)](https://goreportcard.com/report/github.com/psidex/CrowsNest)\n[![buymeacoffee donate link](https://img.shields.io/badge/Donate-Beer-FFDD00.svg?style=flat\u0026colorA=35383d)](https://www.buymeacoffee.com/psidex)\n\n[Watchtower](https://github.com/containrrr/watchtower) for Git: automatically keep local Git repositories up to date with their remotes.\n\n## Configuration\n\n### Flags\n\n`--run-once` or `-r`: Normally CrowsNest would loop forever, set this flag to run once then exit\n\n`--config` or `-c`: Where to look for your config.yaml file (`.` and `$HOME` are automatically searched)\n\n`--verbose` or `-v`: Write a lot more info to the log, useful for finding errors\n\n`--logfile` or `-l`: Write the log to the given file instead of stdout. Should be a full path ending with the file name\n\n### config.yaml\n\nCrowsNest reads its configuration from a `config.yaml` file.\n\nExample `config.yaml` using every possible option:\n\n```yaml\n# The list of repositories we want to watch\nrepositories:\n  # The name of this repsoitory (can be anything, will show up in logs)\n  peicecost:\n    # The path to the root of the repo\n    directory: D:\\Code\\piececost\n    # Extra flags to provide to git when CrowsNest runs `git pull`\n    gitpullflags: [\"--verbose\", \"--autostash\"]\n    # How long to wait between pulls in seconds (defaults to 60), doesn't account for the time it takes to run cmds and pull\n    interval: 900\n    # A command to run before pulling, if this returns a non-zero exit code, the pull will not happen\n    prepullcmd:\n      # The binary to execute, e.g. /bin/bash on debian for a shell script\n      binarypath: C:\\Programs\\dosomething.exe\n      # Any flags/arguments for the binary\n      flags: [\"--user\", \"psidex\"]\n      # Where to execute this binary\n      workingdirectory: D:\\Code\\piececost\\otherdir\n    # A command to be run after pulling, same options as prepullcmd, but a non-zero exit code won't change anything\n    postpullcmd:\n      binarypath: C:\\Programs\\dosomething.exe\n      flags: [\"--user\", \"psidex\"]\n      workingdirectory: D:\\Code\\piececost\\otherdir\n```\n\nThe only required option is the `directory` for each repo, and if you have set pre/post cmds then the `binarypath` and `workingdirectory` need to be valid for each of those.\n\nKeep in mind that if you are running CrowsNest in a Docker container, all of the set directories and the pre and post pull binaries will need to be available and exectuable inside the container.\n\n## Docker\n\nIf you want to try it out in Docker there are images available on [Docker Hub](https://hub.docker.com/repository/docker/psidex/crowsnest).\n\n2 builds are published, `latest` which is inline with the latest commit to this repository, and the versioned tags that are inline with the GitHub releases.\n\n### Example Docker Run\n\nThe crowsnest binary exists in and is run from the `/app` directory in the container.\n\nI chose `/gitrepos/Apollo` in this example for no reason other than its short and descriptive, docker will create that directory automatically.\n\n```bash\ndocker run -d --name crowsnest --restart unless-stopped \\\n    -v $(pwd)/config.yaml:/app/config.yaml:ro \\\n    -v /home/psidex/repos/Apollo:/gitrepos/Apollo \\\n    psidex/crowsnest:latest\n```\n\nMy `config.yaml`:\n\n```yaml\nrepositories:\n  apollo:\n    directory: /gitrepos/Apollo\n```\n\nNotice that the directory is the path inside the container, not the external path.\n\n## Use Cases\n\nThis would be useful if you store configuration files or content in a Git repository and want to keep your local copies up to date with the most recent versions.\n\nPersonally I use this to keep my website up to date as the files are published to GitHub from my development machine but need to be on my server to be served to the internet.\n\n## Bugs And Feature Requests\n\nIf you find a bug or would like to request a new feature please open an [Issue](https://github.com/psidex/CrowsNest/issues/new).\n\n## Development\n\nRequires [govvv](https://github.com/ahmetb/govvv) to build correctly.\n\nSee `build.ps1` or the `Dockerfile` for build commands.\n","funding_links":["https://www.buymeacoffee.com/psidex"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsidex%2Fcrowsnest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsidex%2Fcrowsnest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsidex%2Fcrowsnest/lists"}