https://github.com/pkgstore-archive/github-action-mirror
Universal mirroring repository tool.
https://github.com/pkgstore-archive/github-action-mirror
action actions github github-action github-actions github-mirror mirror pkgstore
Last synced: 11 months ago
JSON representation
Universal mirroring repository tool.
- Host: GitHub
- URL: https://github.com/pkgstore-archive/github-action-mirror
- Owner: pkgstore-archive
- License: mit
- Created: 2021-06-09T13:11:47.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-27T22:48:21.000Z (over 3 years ago)
- Last Synced: 2025-03-02T06:16:51.862Z (11 months ago)
- Topics: action, actions, github, github-action, github-actions, github-mirror, mirror, pkgstore
- Language: Shell
- Homepage:
- Size: 27.3 KB
- Stars: 5
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action: Git Repository Mirror
Universal mirroring repository tool.
## Workflow Syntax
### GitHub > GitLab
```yml
name: "Repository Mirror"
on:
- push
jobs:
mirror:
runs-on: ubuntu-latest
name: "Mirror"
steps:
- uses: pkgstore/github-action-mirror@main
with:
source_repo: "https://github.com/${{ github.repository }}.git"
source_user: "${{ secrets.MIRROR_SOURCE_USER_GITHUB }}"
source_token: "${{ secrets.MIRROR_SOURCE_TOKEN_GITHUB }}"
target_repo: "https://gitlab.com/${{ github.repository }}.git"
target_user: "${{ secrets.MIRROR_TARGET_USER_GITLAB }}"
target_token: "${{ secrets.MIRROR_TARGET_TOKEN_GITLAB }}"
```
### GitHub > GitHub
```yml
name: "Repository Mirror: GitHub"
on:
- push
jobs:
mirror:
runs-on: ubuntu-latest
name: "Mirror"
steps:
- uses: pkgstore/github-action-mirror@main
with:
source_repo: "https://github.com/${{ github.repository }}.git"
source_user: "${{ secrets.MIRROR_SOURCE_USER_GITHUB }}"
source_token: "${{ secrets.MIRROR_SOURCE_TOKEN_GITHUB }}"
target_repo: "${{ secrets.MIRROR_TARGET_URL_GITHUB }}"
target_user: "${{ secrets.MIRROR_TARGET_USER_GITHUB }}"
target_token: "${{ secrets.MIRROR_TARGET_TOKEN_GITHUB }}"
```
## Legend
- `source_repo` - source repository URL.
- `source_user` - source user.
- `source_token` - source token.
- `target_repo` - target repository URL.
- `target_user` - target user.
- `target_token` - target token.