mirror of
https://github.com/A6-9V/MQL5-Google-Onedrive.git
synced 2026-04-10 20:40:56 +00:00
- 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.
22 lines
743 B
Bash
Executable file
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!"
|