Skip to content

A GitHub Action for mirroring your repository to a different remote repository

License

Notifications You must be signed in to change notification settings

jeptechnology/mirror-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mirror-action

A GitHub Action for mirroring your commits to a different remote repository

Mirror a repository with access token over HTTPS

For example, this project uses the following workflow to mirror from GitHub to GitLab

on: [push]
  ...
      steps:
        - uses: actions/checkout@v1
        - uses: jeptechnology/mirror-action@master
          with:
            REMOTE: 'https://gitlab.com/jeptechnology/mirror-action.git'
            GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}

Be sure to set the GIT_ACCESS_TOKEN secret in your repo secrets settings.

NOTE: by default, all branches are pushed. If you want to avoid this behavior, set PUSH_ALL_REFS: "false"

You can further customize the push behavior with the GIT_PUSH_ARGS parameter. By default, this is set to --tags --force --prune

If something goes wrong, you can debug by setting DEBUG: "true"

About

A GitHub Action for mirroring your repository to a different remote repository

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 76.5%
  • Dockerfile 23.5%