From bbae40100287bbf3a655359c878d5fdae25d9171 Mon Sep 17 00:00:00 2001 From: datadunia Date: Thu, 7 May 2026 14:21:50 +0700 Subject: [PATCH] fix: Action TOKEN --- .gitea/workflows/release.yaml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 70a0800..b0b4003 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -18,16 +18,23 @@ jobs: steps: - name: Clone repository with submodules run: | - git config --global --unset-all http.https://git.datadunia.com/.extraheader || true - MY_TOKEN="${{ secrets.TOKEN_BUILD }}" - git config --global http.https://git.datadunia.com/.extraheader "Authorization: token $MY_TOKEN" - git config --global core.askPass "" - git config --global credential.helper "" - # Kita tambahkan --shallow-submodules untuk mempercepat proses jika repo besar - git clone --recurse-submodules https://git.datadunia.com/devops/wireguard-vpn.git . - # Debug - ls -la app/frontend + # 1. Bersihkan semua config global agar tidak ada interferensi header + git config --global --remove-section http || true + git config --global --unset-all core.askPass || true + # 2. Masukkan token ke variabel + TOKEN="${{ secrets.TOKEN_BUILD }}" + + # 3. Lakukan clone dengan menyuntikkan token ke URL + # Format: https://x-token-auth:TOKEN@DOMAIN/REPO.git + # Kita gunakan -c credential.helper="" agar git tidak mencari password di sistem + git clone --recurse-submodules \ + -c credential.helper="" \ + https://x-token-auth:$TOKEN@git.datadunia.com/devops/wireguard-vpn.git . + - name: Debug Submodule Folder + run: | + ls -la app/ + ls -la app/frontend || echo "Frontend folder not found" - name: Setup Go uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff with: