https://github.com/actionsdesk/mirror-sync
Synchronizing mirrored repositories bidirectionally
https://github.com/actionsdesk/mirror-sync
Last synced: 10 months ago
JSON representation
Synchronizing mirrored repositories bidirectionally
- Host: GitHub
- URL: https://github.com/actionsdesk/mirror-sync
- Owner: ActionsDesk
- License: mit
- Archived: true
- Created: 2021-12-15T12:41:08.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-15T13:04:35.000Z (over 4 years ago)
- Last Synced: 2025-03-11T02:48:37.571Z (over 1 year ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mirror-sync
Synchronizing mirrored repositories bidirectionally
## Setup
This action assume that you have a repository on a remote location and that you want to synchronize it with mirror on GitHub.
### Step 1
Create a repository on GitHub
### Step 2
Mirror the repository following [these steps](https://docs.github.com/en/repositories/creating-and-managing-repositories/duplicating-a-repository#mirroring-a-repository).
### Step 3
In the repository on GitHub, add this GitHub Actions workflow by adding a `mirror-sync.yml` file to `.github/workflows`:
```yml
name: Mirror Sync
on:
workflow_dispatch:
push:
schedule:
- cron: '*/5 * * * *'
jobs:
mirror-sync:
runs-on: ubuntu-latest
steps:
- name: Perform mirror sync
uses: ActionsDesk/mirror-sync@main
with:
remote-repository-url: https://${{ secrets.REMOTE_AUTHENTICATION_TOKEN }}@example.com/remote-repository.git
```
If you want to authenticate to the remote repository via HTTPS and an authentication token, add it to the `remote-repository-url` as in the example above.
If you want to use basic authentication, you can pass the user and password like so:
```yml
remote-repository-url: https://${{ secrets.REMOTE_AUTHENTICATION_USER }}:${{ secrets.REMOTE_AUTHENTICATION_PASSWORD }}@example.com/remote-repository
```
If you want to use SSH for autentication, use an action that sets up the SSH key, unless you are using a self-hosted runner that already has SSH keys set up.