Skip to content

dreipol/git-mirror-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mirror

This action, together with actions/checkout allows you to mirror a specific branch from your repository with that of another via ssh.

This is equivalent to adding a new remote to your repo and force pushing to a specific branch of the remote.

Usage

See action.yml

steps:
  - uses: actions/checkout@v4
    with:
      ref: master # Source branch you want to mirror
      fetch-depth: 0 # !important! Fetch full history of the branch !important!
  - uses: dreipol/git-mirror-action@master
    env:
      SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
    with:
      repo: [email protected]/your-repo
      user: [email protected]
      target_branch: master # Defaults to master, so you could leave this away

Read more about how to create and use encrypted secrets.

Why another mirror action?

There are already a few good actions out there but none allow you to only mirror a specific branch.

About

Mirror a specific branch via ssh

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •