Sync Git Repo #621
This file contains hidden or 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: Sync Git Repo | |
| on: | |
| push: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '30 19 */2 * *' | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| REPO_URL: | |
| # Already dead repo | |
| # - 'https://github.com/lvguanjun/copilot_share.git' | |
| # - 'https://github.com/pandora-next/deploy.git' | |
| # - 'https://github.com/3Kmfi6HP/EDtunnel.git' | |
| # - 'https://github.com/DiamondHunters/NodeInject_Hook_example.git' | |
| - 'https://github.com/DiamondHunters/NodeInject.git' | |
| - 'https://github.com/tornadocash/tornado-core.git' | |
| - 'https://github.com/tornadocash/tornado-cli.git' | |
| - 'https://github.com/tornadocash/ui-minified.git' | |
| - 'https://github.com/tornadocash/tornado-relayer.git' | |
| - 'https://github.com/tornadocash/tornado-anonymity-mining.git' | |
| - 'https://github.com/tornadocash/torn-token.git' | |
| # Maybe dead until now, since 2025-08-24 ~ 2025-08-26. | |
| # - 'https://git.unlock-music.dev/um/web.git' | |
| # - 'https://git.unlock-music.dev/um/cli.git' | |
| # - 'https://git.unlock-music.dev/um/um-react.git' | |
| # - 'https://git.unlock-music.dev/um/go-mmkv.git' | |
| # - 'https://git.unlock-music.dev/um/um-react-wry.git' | |
| # - 'https://git.unlock-music.dev/um/kgg-dec.git' | |
| # - 'https://git.unlock-music.dev/um/lib_um_crypto_rust.git' | |
| # - 'https://git.unlock-music.dev/um/joox-crypto.git' | |
| - 'https://git.um-react.app/um/cli.git' | |
| - 'https://git.um-react.app/um/go-mmkv.git' | |
| - 'https://git.um-react.app/um/um-react.git' | |
| - 'https://git.um-react.app/um/um-react-wry.git' | |
| - 'https://git.um-react.app/um/joox-crypto.git' | |
| - 'https://git.um-react.app/um/hwyy-frida-dump.git' | |
| - 'https://github.com/spencerwooo/onedrive-vercel-index.git' | |
| - 'https://github.com/2dust/v2rayN.git' | |
| - 'https://github.com/2dust/v2rayNG.git' | |
| - 'https://github.com/2dust/clashN.git' | |
| # This repo move to https://github.com/v2fly/v2ray-core.git | |
| # - 'https://github.com/v2ray/v2ray-core.git' | |
| - 'https://github.com/macronut/phantomsocks.git' | |
| - 'https://github.com/macronut/ghostcp.git' | |
| - 'https://github.com/macronut/godivert.git' | |
| - 'https://github.com/macronut/magisk-module-phantomsocks.git' | |
| - 'https://github.com/zizifn/edgetunnel.git' | |
| - 'https://github.com/Grasscutters/Grasscutter.git' | |
| - 'https://github.com/LSPosed/MagiskOnWSALocal.git' | |
| - 'https://github.com/iperov/DeepFaceLab.git' | |
| - 'https://github.com/deepfakes/faceswap.git' | |
| - 'https://github.com/SeaHOH/GotoX.git' | |
| - 'https://github.com/moesnow/March7thAssistant.git' | |
| - 'https://github.com/x-dr/telegraph-Image.git' | |
| - 'https://github.com/SpaceTimee/Bot-CealingCat.git' | |
| - 'https://github.com/SpaceTimee/Cealing-Host.git' | |
| - 'https://github.com/SpaceTimee/Console-HostGenerator.git' | |
| # - 'https://github.com/SpaceTimee/Ona-Dop.git' | |
| - 'https://github.com/SpaceTimee/Ona-Pix.git' | |
| - 'https://github.com/SpaceTimee/Ona-Prox.git' | |
| - 'https://github.com/SpaceTimee/Sheas-Cealer.git' | |
| - 'https://github.com/SpaceTimee/Sheas-Dop.git' | |
| - 'https://github.com/SpaceTimee/Sheas-Nginx.git' | |
| - 'https://github.com/SpotX-Official/SpotX.git' | |
| - 'https://github.com/SpotX-Official/SpotX-Bash.git' | |
| - 'https://github.com/ikunshare/Onekey.git' | |
| - 'https://github.com/guozhigq/pilipala.git' | |
| - 'https://github.com/oficcejo/tdx-api.git' | |
| - 'https://github.com/injoyai/tdx.git' | |
| - 'https://github.com/shidenggui/easyquant.git' | |
| - 'https://github.com/shidenggui/easyquotation.git' | |
| - 'https://github.com/shidenggui/easytrader.git' | |
| - 'https://github.com/akfamily/akshare.git' | |
| - 'https://github.com/VentusUta/BewlyBewly-AveMujica.git' | |
| - 'https://github.com/rinnein/bilibili-API-collect.git' | |
| - 'https://github.com/DDSRem-Dev/guangyaclient.git' | |
| - 'https://github.com/JuanCMPDev/deep-proxy.git' | |
| - 'https://github.com/CJackHwang/ds2api.git' | |
| - 'https://github.com/macronut/ghostcp.git' | |
| include: | |
| # - REPO_URL: 'https://git.unlock-music.dev/um/web.git' | |
| # GITLAB_REPO: 'web_v2' | |
| # - REPO_URL: 'https://git.unlock-music.dev/um/lib_um_crypto_rust.git' | |
| # GITLAB_REPO: 'lib_um_crypto_rust_v2' | |
| - REPO_URL: 'https://git.um-react.app/um/web.git' | |
| GITLAB_REPO: 'um_web_v2' | |
| - REPO_URL: 'https://git.um-react.app/um/lib_um_crypto_rust.git' | |
| GITLAB_REPO: 'um_lib_um_crypto_rust_v2' | |
| - REPO_URL: 'https://github.com/SpaceTimee/Cealing-Host.git' | |
| GITLAB_REPO: 'Cealing-Host_v5' | |
| - REPO_URL: 'https://github.com/SpaceTimee/Sheas-Cealer.git' | |
| GITLAB_REPO: 'Sheas-Cealer_v2' | |
| - REPO_URL: 'https://github.com/v2fly/v2ray-core.git' | |
| GITLAB_REPO: 'v2fly_v2ray-core_v2' | |
| - REPO_URL: 'https://github.com/SpaceTimee/Ona-Dop.git' | |
| GITLAB_REPO: 'SpaceTimee_Ona-Dop_v2' | |
| steps: | |
| - name: Clone git repository | |
| run: | | |
| git clone --mirror ${{ matrix.REPO_URL }} | |
| - name: Push to remote | |
| env: | |
| GITLAB_USERNAME: ${{ secrets.GITLAB_USERNAME }} | |
| GITLAB_USERMAIL: ${{ secrets.GITLAB_USERMAIL }} | |
| GITLAB_PUSH_TOKEN: ${{ secrets.GITLAB_PUSH_TOKEN }} | |
| run: | | |
| export REPO_NAME=$(basename "${{ matrix.REPO_URL }}" .git) | |
| export GITLAB_REPO=${{ matrix.GITLAB_REPO }} | |
| # IF GITLAB_REPO is not given, use default path | |
| if [ -z "$GITLAB_REPO" ]; then | |
| GITLAB_REPO="$REPO_NAME" | |
| fi | |
| cd $REPO_NAME.git | |
| git config user.name $GITLAB_USERNAME | |
| git config user.email $GITLAB_USERMAIL | |
| git remote add gitlab https://$GITLAB_USERNAME:$GITLAB_PUSH_TOKEN@gitlab.com/mirrors_git/$GITLAB_REPO.git | |
| git push gitlab --all | |
| visiable: | |
| needs: sync | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Change Project Visiable | |
| env: | |
| GITLAB_VISIABLE_TOKEN: ${{ secrets.GITLAB_VISIABLE_TOKEN }} | |
| run: | | |
| TOKEN="$GITLAB_VISIABLE_TOKEN" | |
| GITLAB_URL="https://gitlab.com" | |
| GROUP_ID="77318098" | |
| # Get the ID of all Projects in the Group | |
| project_ids=$(curl --header "PRIVATE-TOKEN: $TOKEN" "$GITLAB_URL/api/v4/groups/$GROUP_ID/projects" | jq '.[].id') | |
| for id in $project_ids | |
| do | |
| curl --request PUT --header "PRIVATE-TOKEN: $TOKEN" "$GITLAB_URL/api/v4/projects/$id?visibility=public" | |
| done | |
| clean: | |
| needs: sync | |
| if: always() | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| contents: read | |
| steps: | |
| - name: Delete workflow runs | |
| uses: Mattraks/delete-workflow-runs@v2 | |
| with: | |
| token: ${{ github.token }} | |
| repository: ${{ github.repository }} | |
| retain_days: 30 | |
| keep_minimum_runs: 6 |