测试 51.LA 数据挂件功能 v1.0 #57
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
name: code-sync | |
on: | |
push: | |
branches: [main] | |
jobs: | |
push-to-mirror: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
run: | | |
echo "Run Clone Step!" | |
git config --global init.defaultBranch main | |
git init | |
git remote add origin https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
git fetch --all | |
for branch in `git branch -a | grep remotes | grep -v HEAD`; do | |
git branch --track ${branch##*/} $branch | |
done | |
env: | |
GITHUB_REPOSITORY: shenweiyan/Bioit-top | |
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }} | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Push to Coding | |
run: | | |
echo "stop!" | |
#remote_repo="https://${CODING_USERNAME}:${CODING_PASSWORD}@e.coding.net/${CODING_REPOSITORY}.git" | |
#git remote add coding "${remote_repo}" | |
#git show-ref # useful for debugging | |
#git branch --verbose | |
# publish all | |
#git push --all --force coding | |
#git push --tags --force coding | |
env: | |
CODING_REPOSITORY: shenweiyan/webstack/nav.bioitee.src | |
CODING_USERNAME: ${{ secrets.CODING_USERNAME }} | |
CODING_PASSWORD: ${{ secrets.CODING_PASSWORD }} | |
- name: Push to Gitee | |
uses: Yikun/hub-mirror-action@master | |
with: | |
src: github/shenweiyan | |
dst: gitee/shenweiyan | |
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} | |
dst_token: ${{ secrets.GITEE_TOKEN }} | |
static_list: "Bioit-top" | |
force_update: true | |
timeout: '0.5h' | |
- name: Push to GitCode | |
run: | | |
remote_repo="https://shenweiyan:${GITCODE_PAT}@gitcode.com/${GITCODE_REPOSITORY}.git" | |
git remote add gitcode "${remote_repo}" | |
git show-ref | |
git branch --verbose | |
# publish all | |
git push --all --force gitcode | |
git push --tags --force gitcode | |
env: | |
GITCODE_REPOSITORY: shenweiyan/Bioit-top | |
GITCODE_PAT: ${{ secrets.GITCODE_PAT }} |