https://github.com/dongjiang1989/mirror-action
https://github.com/dongjiang1989/mirror-action
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dongjiang1989/mirror-action
- Owner: dongjiang1989
- License: mit
- Created: 2023-06-25T10:12:39.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-26T02:57:42.000Z (4 months ago)
- Last Synced: 2025-02-26T03:30:56.976Z (4 months ago)
- Language: Shell
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Repos Mirror Action
[](https://github.com/kubeservice-stack/repos-mirror-action/actions/workflows/repos-mirror.yml)Auto mirror repos by GitHub Action to muti git registry
## Features
```mermaid
flowchart LR
hub_source("fa:fa-github GitHub|GitLab|Gitee|git provider source repository [private|public]")
hub_target{{"fa:fa-github GitHub|GitLab|Gitee|git provider target repository [private|public]"}}
hub_source --> |"https"| hub_target
```* Sync other public or private repository (e.g. template repositories) with the current repository
* different git provider like GitLab, Gittea,.. as source are supported (with https).
* It is not necesarly needed that source and target repository have same base history.
Because of that reason it is possible to merge 2 total different repositories with the help of the action.## Usage
### Template Repository
```yaml
name:on:
- push
- deletejobs:
sync:
runs-on: ubuntu-latest
name: Repo Mirror Sync
steps:
- uses: actions/checkout@v3
- name: Repo Mirror Sync
uses: kubeservice-stack/repos-mirror-action@
with:
# Such as https://github.com/dongjiang1989/mirror-action.git
target-url:
# Such as dongjiang1989
target-username:
# You can store token in your project's 'Setting > Secrets' and reference the name here. Such as ${{ secrets.ACCESS_TOKEN }}
target-token:
```### Configuration parameters
| Variable | Description | Required | `[Default]` |
|----|----|----|----|
| target-token | Token for the repo. Can be passed in using `${{ secrets.ACCESS_TOKEN }}` | `true` | |
| target-username | Repository user name | `true` | |
| target-url | The target Url with `https` protocol | `true` | |* `target-token` the API token to create non-existent repo, You can get Github token in [here](https://github.com/settings/tokens), GitLab token in [here](https://gitlab.com/-/profile/personal_access_tokens) and the Gitee in [here](https://gitee.com/profile/personal_access_tokens).