Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jenkins-zh/git-backup-actions
Backup git repository into another one
https://github.com/jenkins-zh/git-backup-actions
actions backup backup-cli backup-git git hacktoberfest
Last synced: about 2 months ago
JSON representation
Backup git repository into another one
- Host: GitHub
- URL: https://github.com/jenkins-zh/git-backup-actions
- Owner: jenkins-zh
- License: mit
- Created: 2019-09-29T06:51:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-17T01:27:11.000Z (about 2 years ago)
- Last Synced: 2023-05-17T12:16:15.485Z (over 1 year ago)
- Topics: actions, backup, backup-cli, backup-git, git, hacktoberfest
- Language: Shell
- Homepage: https://jenkins-zh.github.io
- Size: 11.7 KB
- Stars: 4
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git repo backup Action
GitHub Action for backup your git repository.
## Supported Git Provider
* [gitee](https://gitee.com)
* [CodeChina](https://codechina.csdn.net/)## Create Deploy Key
1. Generate deploy key `ssh-keygen -t rsa -f git-backup -q -N ""`
2. Then go to "Settings > Deploy Keys" of the target repository
3. Add your public key within "Allow write access" option.
4. Copy your private deploy key to `GIT_DEPLOY_KEY` secret in your source git repository of "Settings > Secrets"## Environment Variables
- `GIT_DEPLOY_KEY`: **Required**, your deploy key (ssh private key) which has **Write access**
- `TARGET_GIT`: **required**, your backup git repository (please use ssh or git protocol)
- `BRANCH`: **optional**, the branch you want to backup (default value is `master`)```
name: Backup Git Repositoryon:
push:
branches:
- masterjobs:
git-repo-backup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: git-repo-backup
uses: jenkins-zh/[email protected]
env:
GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }}
TARGET_GIT: "[email protected]:surenpi/surenpi.git"
BRANCH: master
```