{"id":13552087,"url":"https://github.com/repo-sync/github-sync","last_synced_at":"2025-05-15T01:08:05.489Z","repository":{"id":35297521,"uuid":"194892111","full_name":"repo-sync/github-sync","owner":"repo-sync","description":"⤵️ A GitHub Action for syncing current repository with remote","archived":false,"fork":false,"pushed_at":"2024-12-09T18:00:20.000Z","size":52,"stargazers_count":411,"open_issues_count":7,"forks_count":106,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-13T23:53:43.204Z","etag":null,"topics":["action","fork","github-action","sync"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/github-repo-sync","language":"Shell","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/repo-sync.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-07-02T15:42:02.000Z","updated_at":"2025-04-13T11:18:30.000Z","dependencies_parsed_at":"2024-01-15T15:47:39.016Z","dependency_job_id":"7d196c7e-e674-4bf2-9398-d6af16a90c6a","html_url":"https://github.com/repo-sync/github-sync","commit_stats":{"total_commits":47,"total_committers":8,"mean_commits":5.875,"dds":0.3829787234042553,"last_synced_commit":"d4222f627ce3fc09144d5cb0cece0b874fe239a3"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repo-sync%2Fgithub-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repo-sync%2Fgithub-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repo-sync%2Fgithub-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repo-sync%2Fgithub-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/repo-sync","download_url":"https://codeload.github.com/repo-sync/github-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254042,"owners_count":22039792,"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":["action","fork","github-action","sync"],"created_at":"2024-08-01T12:01:58.742Z","updated_at":"2025-05-15T01:08:00.478Z","avatar_url":"https://github.com/repo-sync.png","language":"Shell","readme":"# GitHub Sync\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\nA GitHub Action for syncing the current repository using **force push**.\n\n\n## Features\n * Sync branches between two GitHub repositories\n * Sync branches from a remote repository\n * GitHub action can be triggered on a timer or on push\n * To push to a remote repository, please checkout [git-sync](https://github.com/marketplace/actions/git-sync-action)\n * Support syncing tags.\n\n\n## Usage\n\nCreate a personal access token and add to repository's secret as `PAT`\n\n### GitHub Actions\n```\n# File: .github/workflows/repo-sync.yml\n\non:\n  schedule:\n  - cron:  \"*/15 * * * *\"\n  workflow_dispatch:\n\njobs:\n  repo-sync:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n      with:\n        persist-credentials: false\n    - name: repo-sync\n      uses: repo-sync/github-sync@v2\n      with:\n        source_repo: \"\"\n        source_branch: \"\"\n        destination_branch: \"\"\n        sync_tags: \"\"\n        github_token: ${{ secrets.PAT }}\n```\nIf `source_repo` is private or with another provider, either (1) use an authenticated HTTPS repo clone url like `https://${access_token}@github.com/owner/repository.git` or (2) set a `SSH_PRIVATE_KEY` secret environment variable and use the SSH clone url\n\n### Workflow overwriting\n\nIf `destination_branch` and the branch where you will create this workflow will be the same, The workflow (and all files) will be overwritten by `source_branch` files. A potential solution is: Create a new branch with the actions file and make it the default branch. You can update `sync_tags` to match tags you want to sync, e.g `android-14.0.0_*`.\n\n## Advanced Usage: Sync all branches\n1. Make a backup\n2. Create a new branch in your repo (destination repo), it should not share the name with any branch in source repo\n3. Make the new branch the default branch under repo settings\n4. Use `*` for both `source_branch` and `destination_branch`\n5. Optionally, you can force sync all tags:\n   ```\n   with:\n     sync_tags: \"true\" # or * to match all tags.\n   ```\nThis will force sync ALL branches to match source repo. Branches that are created only in the destination repo will not be affected but all the other branches will be *hard reset* to match source repo. ⚠️ This does mean if upstream ever creates a branch that shares the name, your changes will be gone.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://whe.me\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/5880908?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eWei He\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/repo-sync/github-sync/commits?author=wei\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/repo-sync/github-sync/commits?author=wei\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#design-wei\" title=\"Design\"\u003e🎨\u003c/a\u003e \u003ca href=\"#ideas-wei\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://zeke.sikelianos.com\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/2289?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eZeke Sikelianos\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/repo-sync/github-sync/commits?author=zeke\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#ideas-zeke\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://alexpage.com.au\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/19199063?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAlex Page\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/repo-sync/github-sync/issues?q=author%3Aalex-page\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/xtqqczze\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/45661989?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003extqqczze\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/repo-sync/github-sync/commits?author=xtqqczze\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/repo-sync/github-sync/commits?author=xtqqczze\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://unstoppable.software\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/70325615?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKay Harrison-Sims\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/repo-sync/github-sync/issues?q=author%3AGlitchShtick\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Gibby\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/503761?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGibby\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/repo-sync/github-sync/commits?author=Gibby\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepo-sync%2Fgithub-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frepo-sync%2Fgithub-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepo-sync%2Fgithub-sync/lists"}