fix: Action TOKEN
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user