MQL5-Google-Onedrive/scripts/setup_github_secrets.ps1
google-labs-jules[bot] 73c42f43dd Merge feature and fix branches to main
Merged the following branches:
- feat-genx-trader-bot-bridge (ZOLO bridge, Docker updates)
- feature/zolo-integration-update (ZOLO bridge improvements)
- feature/add-web-request (Requests support)
- fix-mql5-ask-bid-usage (Fix for MQL5)
- update-documentation-and-setup-script (Docs update)
- update-trading-bridge-zolo (Bridge IP update)
- expert-mapsar-improvements (MAPSAR EA improvements)
- remote-control-intelligence-tools-integration (Remote control guide)
- feat/cli-documentation (CLI docs)
- perf-optimize-validator (Validator script optimization)
- jules-docker-run-verification (Verification doc update)

Resolved conflicts in:
- mt5/MQL5/Experts/SMC_TrendBreakout_MTF_EA.mq5 (Version 1.21, merged improvements)
- scripts/ci_validate_repo.py (Kept optimized version)
- render.yaml (Merged configs)
- docker-compose.yml (Merged configs)
- README.md & docs (Merged updates)

Security fixes:
- Removed hardcoded credentials from setup_github_secrets.ps1 and docs/GITHUB_CI_CD_SETUP.md.
2026-01-22 01:09:16 +00:00

73 lines
3.3 KiB
PowerShell

# Setup GitHub Secrets for CI/CD
# This script helps you add secrets to GitHub repository
param(
[string]$Repository = "A6-9V/MQL5-Google-Onedrive",
[string]$Email = "your-email@example.com",
[string]$Password = ""
)
Write-Host "========================================" -ForegroundColor Green
Write-Host "GitHub Secrets Setup Helper" -ForegroundColor Green
Write-Host "========================================" -ForegroundColor Green
Write-Host ""
Write-Host "⚠️ SECURITY WARNING" -ForegroundColor Yellow
Write-Host "Using passwords in scripts is not recommended." -ForegroundColor Yellow
Write-Host "Please use GitHub Personal Access Token instead!" -ForegroundColor Yellow
Write-Host ""
Write-Host "Repository: $Repository" -ForegroundColor Cyan
Write-Host "Email: $Email" -ForegroundColor Cyan
Write-Host ""
Write-Host "Required GitHub Secrets:" -ForegroundColor Yellow
Write-Host ""
Write-Host "1. GITHUB_TOKEN (Auto-provided by GitHub Actions)" -ForegroundColor White
Write-Host " ✅ Already available, no action needed" -ForegroundColor Green
Write-Host ""
Write-Host "2. GH_PAT (GitHub Personal Access Token - RECOMMENDED)" -ForegroundColor White
Write-Host " 📋 Steps:" -ForegroundColor Cyan
Write-Host " a. Go to: https://github.com/settings/tokens" -ForegroundColor Gray
Write-Host " b. Generate new token (classic)" -ForegroundColor Gray
Write-Host " c. Select scopes: repo, workflow, write:packages" -ForegroundColor Gray
Write-Host " d. Copy token" -ForegroundColor Gray
Write-Host " e. Add to repository secrets:" -ForegroundColor Gray
Write-Host " https://github.com/$Repository/settings/secrets/actions" -ForegroundColor Gray
Write-Host ""
Write-Host "3. FLY_API_TOKEN (For Fly.io deployment)" -ForegroundColor White
Write-Host " 📋 Get token: flyctl auth token" -ForegroundColor Gray
Write-Host " 📋 Add to: https://github.com/$Repository/settings/secrets/actions" -ForegroundColor Gray
Write-Host ""
Write-Host "Manual Setup Steps:" -ForegroundColor Yellow
Write-Host ""
Write-Host "1. Open: https://github.com/$Repository/settings/secrets/actions" -ForegroundColor Cyan
Write-Host ""
Write-Host "2. Click 'New repository secret'" -ForegroundColor White
Write-Host ""
Write-Host "3. Add these secrets:" -ForegroundColor White
Write-Host " - Name: GH_PAT" -ForegroundColor Gray
Write-Host " Value: [Your Personal Access Token]" -ForegroundColor Gray
Write-Host ""
Write-Host " - Name: FLY_API_TOKEN" -ForegroundColor Gray
Write-Host " Value: [Your Fly.io API token]" -ForegroundColor Gray
Write-Host ""
Write-Host " - Name: GITHUB_EMAIL (Optional)" -ForegroundColor Gray
Write-Host " Value: $Email" -ForegroundColor Gray
Write-Host ""
Write-Host "⚠️ DO NOT ADD PASSWORD AS SECRET!" -ForegroundColor Red
Write-Host " Use Personal Access Token instead!" -ForegroundColor Red
Write-Host ""
Write-Host "After adding secrets:" -ForegroundColor Yellow
Write-Host " 1. Push code to trigger workflow" -ForegroundColor White
Write-Host " 2. Check Actions tab for workflow status" -ForegroundColor White
Write-Host ""
Write-Host "Quick Test:" -ForegroundColor Cyan
Write-Host " git add ." -ForegroundColor Gray
Write-Host " git commit -m 'Setup CI/CD'" -ForegroundColor Gray
Write-Host " git push origin develop" -ForegroundColor Gray
Write-Host ""