MQL5-Google-Onedrive/scripts/sync_to_gitlab.sh
google-labs-jules[bot] 50e8c2ac30 feat: automated GitLab trigger and runner setup
- Added .github/workflows/gitlab-sync.yml for automated synchronization.
- Fixed scripts/setup_gitlab_runner.sh with the provided runner authentication token.
- Finalized .gitlab-ci.yml and docs/GITLAB_INTEGRATION.md.
2026-02-24 07:22:15 +00:00

22 lines
743 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
RED='\033[0;31m'
GREEN='\033[0;32m'
CYAN='\033[0;36m'
NC='\033[0m'
log_info() { echo -e "${CYAN}[INFO]${NC} $1"; }
log_success() { echo -e "${GREEN}[SUCCESS]${NC} $1"; }
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
GITLAB_URL="https://gitlab.com/a6-nuna-9v/V9.git"
GITLAB_TOKEN="${GITLAB_ACCESS_TOKEN:-}"
if [[ -z "$GITLAB_TOKEN" ]]; then
log_error "GITLAB_ACCESS_TOKEN is not set."
exit 1
fi
REMOTE_URL="https://oauth2:${GITLAB_TOKEN}@gitlab.com/a6-nuna-9v/V9.git"
log_info "Adding GitLab remote..."
git remote remove gitlab 2>/dev/null || true
git remote add gitlab "$REMOTE_URL"
log_info "Pushing to GitLab..."
git push gitlab HEAD:main --force
log_success "Successfully synced to GitLab!"