forked from kube-rs/kube
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nick
committed
May 29, 2024
1 parent
7320a9e
commit 0f0fdd2
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
workflow_dispatch: | ||
inputs: | ||
ref: | ||
description: "Why trigger?" | ||
required: true | ||
type: string | ||
|
||
name: update mirror | ||
|
||
env: | ||
SSH_KEY: "${{ secrets.SSH_KEY_TO_GITEE_MIRROR }}" | ||
|
||
jobs: | ||
update_mirror: | ||
name: update mirror | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: clone repo | ||
run: | | ||
mkdir kube | ||
cd kube | ||
git clone --bare https://github.com/deepflowio/kube.git .git | ||
git config --unset core.bare | ||
git reset --hard | ||
- name: push to mirror | ||
run: | | ||
cd kube | ||
mkdir -p ~/.ssh/ | ||
echo "${{ env.SSH_KEY}}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan gitee.com >> ~/.ssh/known_hosts | ||
git remote add gitee [email protected]:deepflowce/kube.git | ||
git push --no-verify --all gitee -u -f |