• Stars
    star
    143
  • Rank 257,007 (Top 6 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 5 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Git Mirror Action

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

Inputs

source-repo

Required SSH URL of the source repo.

destination-repo

Required SSH URL of the destination repo.

dry-run

Optional (default: false) Execute a dry run. All steps are executed, but no updates are pushed to the destination repo.

Environment variables

SSH_PRIVATE_KEY: Create a SSH key without a passphrase which has access to both repositories. On GitHub you can add the public key as a deploy key to the repository. GitLab has also deploy keys with write access and for any other services you may have to add the public key to your personal account.
Store the private key as an encrypted secret and use it in your workflow as seen in the example workflow below.

SSH_KNOWN_HOSTS: Known hosts as used in the known_hosts file. StrictHostKeyChecking is disabled in case the variable isn't available.

If you added the private key or known hosts in an environment make sure to reference the environment name in your workflow otherwise the secret is not passed to the workflow.

Example workflow

name: Mirror to Bitbucket Repo

on: [ push, delete, create ]

# Ensures that only one mirror task will run at a time.
concurrency:
  group: git-mirror

jobs:
  git-mirror:
    runs-on: ubuntu-latest
    steps:
      - uses: wearerequired/git-mirror-action@v1
        env:
          SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
          SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
        with:
          source-repo: "[email protected]:wearerequired/git-mirror-action.git"
          destination-repo: "[email protected]:wearerequired/git-mirror-action.git"

Docker

docker run --rm -e "SSH_PRIVATE_KEY=$(cat ~/.ssh/id_rsa)" $(docker build -q .) "$SOURCE_REPO" "$DESTINATION_REPO"

License

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

More Repositories

1

lint-action

โœจ GitHub Action for detecting and auto-fixing lint errors
JavaScript
568
star
2

required-foundation

DISCONTINUED: A responsive parent theme for WordPress, based on the fantastic Foundation framework.
PHP
147
star
3

traduttore

๐Ÿ—ผ A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.
PHP
72
star
4

admin-menu-manager

Manage the WordPress admin menu using a simple drag & drop interface.
JavaScript
61
star
5

user-feedback

Collect user feedback directly from your WordPress site
PHP
52
star
6

required-starter

DISCONTINUED: A sample child theme for required+ Foundation, the responsive WordPress parent theme based on Foundation.
PHP
23
star
7

slack-messaging-action

๐Ÿ’Œ A GitHub Action for sending (and updating) messages of any layout and formatting from GitHub Actions to Slack.
JavaScript
20
star
8

required-foundation-shortcodes

DISCONTINUED: A collection of WordPress shortcode plugins for themes based on Foundation.
19
star
9

wp-cli-clear-opcache

๐Ÿ”ง Use WP-CLI to clear the OPcache for a site via HTTP.
PHP
17
star
10

wp-team-list

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง A WordPress plugin to display your teammates (users) anywhere on your WordPress site.
PHP
17
star
11

WP-Widget-Disable

๐Ÿ–ผ A WordPress plugin that allows you to disable Sidebar and Dashboard Widgets.
PHP
17
star
12

required-email-notifications

WordPress plugin to handle email notifications with custom adapters like Mandrill or Sendgrid
PHP
14
star
13

harvest-api-php-client

โฑ PHP client library for the Harvest REST API v2.
PHP
14
star
14

custom-menu-item-types

Additional menu item types that can be easily added to the menu like line breaks and titles.
PHP
14
star
15

wp-requirements-check

Simple drop-in library for WordPress plugins to check for PHP and WordPress version requirements
PHP
14
star
16

traduttore-registry

Allows loading translation files from a custom GlotPress site running Traduttore
PHP
13
star
17

coding-standards

๐Ÿ’ป required coding standards for PHP, JavaScript and CSS.
JavaScript
11
star
18

rest-likes

A simple post like plugin that uses the WP REST API for endorsing posts & pages.
PHP
11
star
19

simple-user-adding

A WordPress plugin that makes adding new users to your site easier than ever.
PHP
11
star
20

local-google-fonts

Get Google Fonts for local hosting.
TypeScript
10
star
21

digest

๐Ÿ“ง Get a daily/weekly/monthly digest of what's happening on your WordPress site instead of receiving a single email each time.
PHP
10
star
22

composer-wp-config

๐Ÿงƒ Composer plugin to create a wp-config.php when installing WordPress.
PHP
9
star
23

hide-jetpack-promotions

WordPress plugin to remove all admin notices for promotions added by Jetpack.
PHP
8
star
24

wp-feed-post-thumbnail

๐Ÿž๏ธ WordPress Plugin to add MRSS namespace to RSS2 feed and featured image to the RSS2 feed item.
PHP
7
star
25

common-php

Common PHP components used by our WordPress plugins.
PHP
6
star
26

translations-cache

WordPress mu-plugin to reduces file reads for translations by caching the first read via APCu.
PHP
6
star
27

required-google-analytics

A lightweight WordPress plugin to add Google's analytics.js to your site, the modern way.
PHP
5
star
28

filename-normalizer

Normalizes filenames before they are uploaded.
PHP
5
star
29

h2push

Sends Link headers to bring HTTP/2 Server Push for scripts and styles to WordPress.
PHP
5
star
30

composer-deployer

๐Ÿš€ Composer plugin to create a deployer config (deploy.php) with custom deployment tasks.
PHP
5
star
31

private-page-login

Redirects non-logged in visitors to a private page to the login page.
PHP
4
star
32

required-wp-rating

WordPress plugin to make ratings for every post / page.
PHP
4
star
33

composer-scripts

๐Ÿงฐ A collection of useful Composer scripts and commands, especially for WordPress projects.
PHP
4
star
34

.github

Repository for GitHub stuff like workflow templates.
3
star
35

post-header-image

WordPress plugin for adding a custom header image to posts. Only supports the block editor.
JavaScript
2
star
36

capistrano-wearerequired

Collection of recipes and tasks specialized on WordPress deployment.
Ruby
2
star
37

jquery-light

Removes jQuery Migrate from the list of jQuery dependencies and allows jQuery to enqueue before `</body>` instead of in the `<head>`.
PHP
1
star
38

rest-api-same-origin

WordPress plugin to limit the Access-Control-Allow-Origin header to only allowed origins.
PHP
1
star
39

register-default-theme-directory

Must-use plugin: Registers the theme directory for default WordPress themes.
PHP
1
star
40

user-roles-adjustments

Custom functionality for user editing in combination with the Members plugin. Retains user levels and limits user editing capabilities.
PHP
1
star
41

members-unfiltered-html

WordPress mu-plugin which allows to add the `unfiltered_html` capability to a role in a multisite install via Members
PHP
1
star
42

required-wp-top-content

WordPress plugin for getting analytics data for posts & pages.
PHP
1
star
43

lint-action-test

Test repo for https://github.com/wearerequired/lint-action
JavaScript
1
star
44

harvest-chrome

Harvest Chrome extension with Helpscout support
JavaScript
1
star
45

required-foundation-column-shortcode

DISCONTINUED: Shortcode plugin to create columns according to the grid of Foundation in the required+ Foundation theme.
PHP
1
star
46

required-tobii

A WordPress plugin to implement lightbox functionality for images and galleries.
PHP
1
star