fix: Action TOKEN
This commit is contained in:
@@ -18,16 +18,23 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Clone repository with submodules
|
- name: Clone repository with submodules
|
||||||
run: |
|
run: |
|
||||||
git config --global --unset-all http.https://git.datadunia.com/.extraheader || true
|
# 1. Bersihkan semua config global agar tidak ada interferensi header
|
||||||
MY_TOKEN="${{ secrets.TOKEN_BUILD }}"
|
git config --global --remove-section http || true
|
||||||
git config --global http.https://git.datadunia.com/.extraheader "Authorization: token $MY_TOKEN"
|
git config --global --unset-all core.askPass || true
|
||||||
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
|
|
||||||
|
|
||||||
|
# 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
|
- name: Setup Go
|
||||||
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
|
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user