Files
proxmox/scripts/deployment/mirror-github-fork-to-gitea.sh
defiQUG 4ebf2d7902
Some checks failed
Deploy to Phoenix / validate (push) Failing after 1s
Deploy to Phoenix / deploy (push) Has been skipped
Deploy to Phoenix / deploy-atomic-swap-dapp (push) Has been skipped
Deploy to Phoenix / cloudflare (push) Has been skipped
chore(repo): sync operator workspace (config, scripts, docs, multi-chain)
Add optional Cosmos/Engine-X/act-runner templates, CWUSDC/EI-matrix tooling,
non-EVM route planner in multi-chain-execution (tests passing), token list and
extraction updates, and documentation (MetaMask matrix, GRU/CWUSDC packets).

Ignore institutional evidence tarballs/sha256 under reports/status.

Validated with: bash scripts/verify/run-all-validation.sh --skip-genesis

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 16:25:08 -07:00

31 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Mirror a GitHub fork to Gitea (push --mirror). Run from operator LAN when Gitea is reachable.
#
# Required:
# GITEA_REMOTE — e.g. https://gitea.d-bis.org/ORG/DefiLlama-Adapters.git
# Optional:
# GITHUB_FORK — default https://github.com/Defi-Oracle-Meta-Blockchain/DefiLlama-Adapters.git
#
# Usage:
# export GITEA_REMOTE='https://USER:TOKEN@gitea.d-bis.org/d-bis/DefiLlama-Adapters.git'
# ./scripts/deployment/mirror-github-fork-to-gitea.sh
#
# Or dry-run (fetch only):
# DRY_RUN=1 ./scripts/deployment/mirror-github-fork-to-gitea.sh
set -euo pipefail
GITHUB_FORK="${GITHUB_FORK:-https://github.com/Defi-Oracle-Meta-Blockchain/DefiLlama-Adapters.git}"
if [[ -z "${GITEA_REMOTE:-}" ]]; then
echo "Set GITEA_REMOTE to your Gitea repo URL (with credentials if needed)." >&2
exit 1
fi
TMP="${TMPDIR:-/tmp}/mirror-defillama-$$"
cleanup() { rm -rf "$TMP"; }
trap cleanup EXIT
git clone --mirror "$GITHUB_FORK" "$TMP"
if [[ "${DRY_RUN:-}" == "1" ]]; then
echo "DRY_RUN=1: mirror clone OK; skip push to GITEA_REMOTE"
exit 0
fi
git -C "$TMP" push --mirror "$GITEA_REMOTE"
echo "Mirror push completed."