Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

belezanaweb/repository-mirroring-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

A GitHub Action for mirroring a repository to another repository on GitHub, GitLab, BitBucket, AWS CodeCommit, etc.

This will copy all commits, branches and tags.

⚠️ Note that the other settings will not be copied. Please check which branch is 'default branch' after the first mirroring.

Usage

Customize following example workflow and save as .github/workflows/main.yml on your source repository.

cf. Creating and using secrets .

name: Mirroring

on: [push, delete]

jobs:
  to_gitlab:
    runs-on: ubuntu-18.04
    steps:                                              # <-- must use actions/checkout@v1 before mirroring!
    - uses: actions/checkout@v1
    - uses: pixta-dev/repository-mirroring-action@v1
      with:
        target_repo_url:
          git@gitlab.com:<username>/<target_repository_name>.git
        ssh_private_key:                                # <-- use 'secrets' to pass credential information.
          ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}

  to_codecommit:                                        # <-- different jobs are executed in parallel.
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v1
    - uses: pixta-dev/repository-mirroring-action@v1
      with:
        target_repo_url:
          ssh://git-codecommit.<somewhere>.amazonaws.com/v1/repos/<target_repository_name>
        ssh_private_key:
          ${{ secrets.CODECOMMIT_SSH_PRIVATE_KEY }}
        ssh_username:                                   # <-- (for codecommit) you need to specify ssh-key-id as ssh username.
          ${{ secrets.CODECOMMIT_SSH_PRIVATE_KEY_ID }}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 68.3%
  • Dockerfile 31.7%