File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Mirror this repo to Gitee
2+ on :
3+ push :
4+ branches :
5+ - main
6+ tags :
7+ - " *"
8+
9+ jobs :
10+ mirror :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+
17+ - name : Mirror repo to Gitee
18+ id : mirror-to-gitee
19+ shell : bash
20+ env :
21+ INPUT_SSH_PRIVATE_KEY : ${{ secrets.SSH_PRIVATE_KEY_GITEE_MIRROR }}
22+ INPUT_TARGET_REPO_URL :
[email protected] :MayuriNFC/nix-config.git 23+ run : |
24+ set -eu
25+
26+ mkdir -p ~/.ssh
27+ echo "$INPUT_SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
28+ chmod 600 ~/.ssh/id_rsa
29+
30+ export GIT_SSH_COMMAND="ssh -v -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no"
31+ git remote add mirror "$INPUT_TARGET_REPO_URL"
32+ git push --tags --force --prune mirror "refs/remotes/origin/*:refs/heads/*"
You can’t perform that action at this time.
0 commit comments