Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
copy

GitHub Action

Mirror a repository using SSH

v1.0.0

Mirror a repository using SSH

copy

Mirror a repository using SSH

Action for mirroring a repository in another location (Bitbucket, GitHub, GitLab, …) using SSH

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Mirror a repository using SSH

uses: wearerequired/[email protected]

Learn more about this action in wearerequired/git-mirror-action

Choose a version

Git Mirror Action

A GitHub Action for mirroring a git repository to another location via SSH.

Inputs

source-repo

Required SSH URLs of the source repo.

destination-repo

Required SSH URLs of the destination repo.

Environment variables

SSH_PRIVATE_KEY: Create a SSH key which has access to both repositories. On GitHub they are called "deploy keys". Store the private key as a secret and use it in your workflow as seen in the example usage below.

Example usage

uses: wearerequired/git-mirror-action@master
env:
  SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
with:
  source-repo: '[email protected]:wearerequired/git-mirror-action.git'
  destination-repo: '[email protected]:wearerequired/git-mirror-action.git'

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.