{"id":25665647,"url":"https://github.com/cssnr/mirror-repository-action","last_synced_at":"2025-10-18T01:54:49.790Z","repository":{"id":276938617,"uuid":"863237674","full_name":"cssnr/mirror-repository-action","owner":"cssnr","description":"Mirror Git Repository to Remote Host","archived":false,"fork":false,"pushed_at":"2025-03-14T21:15:18.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T17:01:27.414Z","etag":null,"topics":["actions"],"latest_commit_sha":null,"homepage":"https://cssnr.github.io","language":"Shell","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/cssnr.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-26T00:38:27.000Z","updated_at":"2025-03-14T21:12:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"120cfcf8-b9c2-419e-afdb-efd0a70be204","html_url":"https://github.com/cssnr/mirror-repository-action","commit_stats":null,"previous_names":["cssnr/mirror-repository-action"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssnr%2Fmirror-repository-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssnr%2Fmirror-repository-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssnr%2Fmirror-repository-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssnr%2Fmirror-repository-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cssnr","download_url":"https://codeload.github.com/cssnr/mirror-repository-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250285640,"owners_count":21405296,"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":["actions"],"created_at":"2025-02-24T07:28:34.135Z","updated_at":"2025-10-18T01:54:49.781Z","avatar_url":"https://github.com/cssnr.png","language":"Shell","funding_links":["https://ko-fi.com/cssnr"],"categories":[],"sub_categories":[],"readme":"[![GitHub Tag Major](https://img.shields.io/github/v/tag/cssnr/mirror-repository-action?sort=semver\u0026filter=!v*.*\u0026logo=git\u0026logoColor=white\u0026labelColor=585858\u0026label=%20)](https://github.com/cssnr/mirror-repository-action/tags)\n[![GitHub Tag Minor](https://img.shields.io/github/v/tag/cssnr/mirror-repository-action?sort=semver\u0026filter=!v*.*.*\u0026logo=git\u0026logoColor=white\u0026labelColor=585858\u0026label=%20)](https://github.com/cssnr/mirror-repository-action/releases)\n[![GitHub Release Version](https://img.shields.io/github/v/release/cssnr/mirror-repository-action?logo=git\u0026logoColor=white\u0026labelColor=585858\u0026label=%20)](https://github.com/cssnr/mirror-repository-action/releases/latest)\n[![Workflow Release](https://img.shields.io/github/actions/workflow/status/cssnr/mirror-repository-action/release.yaml?logo=cachet\u0026label=release)](https://github.com/cssnr/mirror-repository-action/actions/workflows/release.yaml)\n[![Workflow Test](https://img.shields.io/github/actions/workflow/status/cssnr/mirror-repository-action/test.yaml?logo=cachet\u0026label=test)](https://github.com/cssnr/mirror-repository-action/actions/workflows/test.yaml)\n[![Workflow Lint](https://img.shields.io/github/actions/workflow/status/cssnr/mirror-repository-action/lint.yaml?logo=cachet\u0026label=lint)](https://github.com/cssnr/mirror-repository-action/actions/workflows/lint.yaml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_mirror-repository-action\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=cssnr_mirror-repository-action)\n[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/mirror-repository-action?logo=github\u0026label=updated)](https://github.com/cssnr/mirror-repository-action/pulse)\n[![Codeberg Last Commit](https://img.shields.io/gitea/last-commit/cssnr/mirror-repository-action/master?gitea_url=https%3A%2F%2Fcodeberg.org%2F\u0026logo=codeberg\u0026logoColor=white\u0026label=updated)](https://codeberg.org/cssnr/mirror-repository-action)\n[![GitHub Contributors](https://img.shields.io/github/contributors/cssnr/mirror-repository-action?logo=github)](https://github.com/cssnr/mirror-repository-action/graphs/contributors)\n[![GitHub Repo Size](https://img.shields.io/github/repo-size/cssnr/mirror-repository-action?logo=bookstack\u0026logoColor=white\u0026label=repo%20size)](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme)\n[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/mirror-repository-action?logo=htmx)](https://github.com/cssnr/mirror-repository-action)\n[![GitHub Discussions](https://img.shields.io/github/discussions/cssnr/mirror-repository-action?logo=github)](https://github.com/cssnr/mirror-repository-action/discussions)\n[![GitHub Forks](https://img.shields.io/github/forks/cssnr/mirror-repository-action?style=flat\u0026logo=github)](https://github.com/cssnr/mirror-repository-action/forks)\n[![GitHub Repo Stars](https://img.shields.io/github/stars/cssnr/mirror-repository-action?style=flat\u0026logo=github)](https://github.com/cssnr/mirror-repository-action/stargazers)\n[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat\u0026logo=github\u0026label=org%20stars)](https://cssnr.github.io/)\n[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord\u0026logoColor=white\u0026label=discord\u0026color=7289da)](https://discord.gg/wXy6m2X8wY)\n[![Ko-fi](https://img.shields.io/badge/Ko--fi-72a5f2?logo=kofi\u0026label=support)](https://ko-fi.com/cssnr)\n\n# Mirror Repository Action\n\n- [Inputs](#Inputs)\n- [Setup Instructions](#Setup-Instructions)\n- [Example](#Example)\n- [Tags](#Tags)\n- [Support](#Support)\n- [Contributing](#Contributing)\n\nMirror Git Repository to Remote Host.\n\n## Inputs\n\n| Input    | Required  | Default\u0026nbsp;Value | Description\u0026nbsp;of\u0026nbsp;Input\u0026nbsp;Value                |\n| :------- | :-------: | :----------------- | :------------------------------------------------------- |\n| url      | or `host` | -                  | \\* Full URL to Mirror; Overrides: `host`/`owner`/`repo`  |\n| host     | or `url`  | -                  | \\* Full Host to Mirror; Example: `https://codeberg.org`  |\n| owner    |     -     | Repo Owner         | \\* Repository Owner of Mirror (if different from source) |\n| repo     |     -     | Repo Name          | \\* Repository Name of Mirror (if different from source)  |\n| create   |     -     | `false`            | \\* Set to `true` to attempt to Create the Mirror Repo    |\n| username |     -     | Repo Owner         | Username for Authentication to Mirror                    |\n| password |  **Yes**  | -                  | Token or Password for Authentication to Mirror           |\n| summary  |     -     | `true`             | Add Job Summary. Set to `false` to Disable               |\n| priavte  |     -     | Repo Private       | If the Mirror Repo Status is Different from Source       |\n\n**url/host:** You must provide either a full repository `url` or a `host` value.  \nExample: https://github.com/cssnr/mirror-repository-action\n\n**owner/repo:** If different from source, you must specify these values (overridden by `url`).\n\n**create:** Tested with codeberg but should also work with gitea/forgejo. Set to `true` to enable.\n\n**summary:** Write a Summary for the job. To disable this set to `false`.\n\n\u003cdetails\u003e\u003csummary\u003e👀 View Example Job Summary\u003c/summary\u003e\n\n---\n\n✅ Successfully Mirrored: `cssnr/mirror-repository-action`\n\n- https://codeberg.org/cssnr/mirror-repository-action\n\n\u003cdetails\u003e\u003csummary\u003eResults\u003c/summary\u003e\n\n```text\nremote:\nremote: Create a new pull request for 'updates':\nremote:   https://codeberg.org/cssnr/mirror-repository-action/compare/master...updates\nremote:\nTo https://codeberg.org/cssnr/mirror-repository-action\n   eaadc3f..da84f34  origin/updates -\u003e updates\n```\n\n\u003c/details\u003e\n\n---\n\n\u003c/details\u003e\n\n## Setup Instructions\n\n1. Create a Token for Mirror to use as a Password for Pushing Commits, or Creating Repositories.\n   - Codeberg/Gitea/Forgejo go here: https://codeberg.org/user/settings/applications\n   - Select Permissions: `write:organization` `write:repository` `write:user`\n\n2. Create Remote Repository to Mirror (or set `create` to `true` for codeberg.org).\n\n3. Go to the settings for your source repository on GitHub and add the `CODEBERG_TOKEN` secret.\n   - For organizations, you can add the token one time at the Organization level.\n\n4. Add the following file to source repository on GitHub: `.github/workflows/mirror.yaml`\n   - The `owner` is automatically set to the GitHub Organization or Username if personal. Set to override.\n   - The `repo` is automatically set to the GitHub Repository Name. This should only be set to rename repo.\n   - For Codeberg, use the `host` to `https://codeberg.org` and set the `username` to your Codeberg username.\n\n\u003e [!TIP]  \n\u003e This process has been automated with a Web Extension.  \n\u003e However, currently requires manual installation:\n\u003e [cssnr/github-extension](https://github.com/cssnr/github-extension)\n\n## Example\n\nThe below yaml is available in this file: [.github/workflows/mirror.yaml](mirror.yaml)\n\n```yaml\nname: 'Mirror'\n\non:\n  workflow_dispatch:\n  push:\n    branches: ['**']\n    tags: ['**']\n\njobs:\n  mirror:\n    name: 'Mirror'\n    runs-on: ubuntu-latest\n    timeout-minutes: 5\n\n    steps:\n      - name: 'Checkout'\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - name: 'Mirror to Codeberg'\n        uses: cssnr/mirror-repository-action@v1\n        with:\n          #url: https://codeberg.org/cssnr/mirror-repository-action\n          host: https://codeberg.org\n          #owner: cssnr\n          #repo: mirror-repository-action\n          create: true\n          username: shaner\n          password: ${{ secrets.CODEBERG_TOKEN }}\n```\n\n\u003e [!IMPORTANT]  \n\u003e Checkout `with: fetch-depth: 0` is necessary!\n\nFor more examples, you can check out other projects using this action:  \nhttps://github.com/cssnr/mirror-repository-action/network/dependents\n\n## Tags\n\nThe following rolling [tags](https://github.com/cssnr/mirror-repository-action/tags) are maintained.\n\n| Version\u0026nbsp;Tag                                                                                                                                                                                                                 | Rolling | Bugs | Feat. |   Name    |  Target  | Example  |\n| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :--: | :---: | :-------: | :------: | :------- |\n| [![GitHub Tag Major](https://img.shields.io/github/v/tag/cssnr/mirror-repository-action?sort=semver\u0026filter=!v*.*\u0026style=for-the-badge\u0026label=%20\u0026color=44cc10)](https://github.com/cssnr/mirror-repository-action/releases/latest) |   ✅    |  ✅  |  ✅   | **Major** | `vN.x.x` | `vN`     |\n| [![GitHub Tag Minor](https://img.shields.io/github/v/tag/cssnr/mirror-repository-action?sort=semver\u0026filter=!v*.*.*\u0026style=for-the-badge\u0026label=%20\u0026color=blue)](https://github.com/cssnr/mirror-repository-action/releases/latest) |   ✅    |  ✅  |  ❌   | **Minor** | `vN.N.x` | `vN.N`   |\n| [![GitHub Release](https://img.shields.io/github/v/release/cssnr/mirror-repository-action?style=for-the-badge\u0026label=%20\u0026color=red)](https://github.com/cssnr/mirror-repository-action/releases/latest)                           |   ❌    |  ❌  |  ❌   | **Micro** | `vN.N.N` | `vN.N.N` |\n\nYou can view the release notes for each version on the [releases](https://github.com/cssnr/mirror-repository-action/releases) page.\n\nThe **Major** tag is recommended. It is the most up-to-date and always backwards compatible.\nBreaking changes would result in a **Major** version bump. At a minimum you should use a **Minor** tag.\n\n# Support\n\nFor general help or to request a feature, see:\n\n- Q\u0026A Discussion: https://github.com/cssnr/mirror-repository-action/discussions/categories/q-a\n- Request a Feature: https://github.com/cssnr/mirror-repository-action/discussions/categories/feature-requests\n\nIf you are experiencing an issue/bug or getting unexpected results, you can:\n\n- Report an Issue: https://github.com/cssnr/mirror-repository-action/issues\n- Chat with us on Discord: https://discord.gg/wXy6m2X8wY\n- Provide General Feedback: [https://cssnr.github.io/feedback/](https://cssnr.github.io/feedback/?app=Mirror%20Repository%20Action)\n\nFor more information, see the CSSNR [SUPPORT.md](https://github.com/cssnr/.github/blob/master/.github/SUPPORT.md#support).\n\n# Contributing\n\nPlease consider making a donation to support the development of this project\nand [additional](https://cssnr.com/) open source projects.\n\n[![Ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/cssnr)\n\nIf you would like to submit a PR, please review the [CONTRIBUTING.md](#contributing-ov-file).\n\nAdditionally, you can support other GitHub Actions I have published:\n\n- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)\n- [Portainer Stack Deploy Action](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)\n- [Docker Context Action](https://github.com/cssnr/docker-context-action?tab=readme-ov-file#readme)\n- [VirusTotal Action](https://github.com/cssnr/virustotal-action?tab=readme-ov-file#readme)\n- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme)\n- [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action?tab=readme-ov-file#readme)\n- [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)\n- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action?tab=readme-ov-file#readme)\n- [JSON Key Value Check Action](https://github.com/cssnr/json-key-value-check-action?tab=readme-ov-file#readme)\n- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action?tab=readme-ov-file#readme)\n- [Cloudflare Purge Cache Action](https://github.com/cssnr/cloudflare-purge-cache-action?tab=readme-ov-file#readme)\n- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action?tab=readme-ov-file#readme)\n- [Package Changelog Action](https://github.com/cssnr/package-changelog-action?tab=readme-ov-file#readme)\n- [NPM Outdated Check Action](https://github.com/cssnr/npm-outdated-action?tab=readme-ov-file#readme)\n- [Label Creator Action](https://github.com/cssnr/label-creator-action?tab=readme-ov-file#readme)\n- [Algolia Crawler Action](https://github.com/cssnr/algolia-crawler-action?tab=readme-ov-file#readme)\n- [Upload Release Action](https://github.com/cssnr/upload-release-action?tab=readme-ov-file#readme)\n- [Check Build Action](https://github.com/cssnr/check-build-action?tab=readme-ov-file#readme)\n- [Web Request Action](https://github.com/cssnr/web-request-action?tab=readme-ov-file#readme)\n- [Get Commit Action](https://github.com/cssnr/get-commit-action?tab=readme-ov-file#readme)\n\n\u003cdetails\u003e\u003csummary\u003e❔ Unpublished Actions\u003c/summary\u003e\n\nThese actions are not published on the Marketplace, but may be useful.\n\n- [cssnr/draft-release-action](https://github.com/cssnr/draft-release-action?tab=readme-ov-file#readme) - Keep a draft release ready to publish.\n- [cssnr/env-json-action](https://github.com/cssnr/env-json-action?tab=readme-ov-file#readme) - Convert env file to json or vice versa.\n- [cssnr/push-artifacts-action](https://github.com/cssnr/push-artifacts-action?tab=readme-ov-file#readme) - Sync files to a remote host with rsync.\n- [smashedr/update-release-notes-action](https://github.com/smashedr/update-release-notes-action?tab=readme-ov-file#readme) - Update release notes.\n- [smashedr/combine-release-notes-action](https://github.com/smashedr/combine-release-notes-action?tab=readme-ov-file#readme) - Combine release notes.\n\n---\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e📝 Template Actions\u003c/summary\u003e\n\nThese are basic action templates that I use for creating new actions.\n\n- [js-test-action](https://github.com/smashedr/js-test-action?tab=readme-ov-file#readme) - JavaScript\n- [py-test-action](https://github.com/smashedr/py-test-action?tab=readme-ov-file#readme) - Python\n- [ts-test-action](https://github.com/smashedr/ts-test-action?tab=readme-ov-file#readme) - TypeScript\n- [docker-test-action](https://github.com/smashedr/docker-test-action?tab=readme-ov-file#readme) - Docker Image\n\nNote: The `docker-test-action` builds, runs and pushes images to [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry).\n\n---\n\n\u003c/details\u003e\n\nFor a full list of current projects visit: [https://cssnr.github.io/](https://cssnr.github.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssnr%2Fmirror-repository-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcssnr%2Fmirror-repository-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssnr%2Fmirror-repository-action/lists"}