fix: shallow
This commit is contained in:
@@ -18,15 +18,21 @@ jobs:
|
||||
steps:
|
||||
- name: Clone repository with submodules
|
||||
run: |
|
||||
# 1. Set config secara global agar terbaca oleh submodule
|
||||
# Gunakan "token" atau "Bearer" sesuai konfigurasi Gitea Anda
|
||||
git config --global http.extraheader "Authorization: Bearer ${{ secrets.MY_GITEA_TOKEN }}"
|
||||
git clone --recurse-submodules -c "url.https://token:${{ gitea.token }}@git.datadunia.com/.insteadOf=https://git.datadunia.com/" https://git.datadunia.com/devops/wireguard-vpn.git
|
||||
|
||||
# 2. Matikan prompt agar tidak hang jika otentikasi gagal
|
||||
git config --global http."https://git.datadunia.com/".extraheader "Authorization: token ${{ gitea.token }}"
|
||||
|
||||
# 2. Matikan prompt interaktif agar tidak berhenti meminta password
|
||||
git config --global core.askPass ""
|
||||
|
||||
# 3. Jalankan clone
|
||||
git clone --recurse-submodules ${{ gitea.server_url }}/${{ gitea.repository }}.git .
|
||||
# 3. Jalankan clone secara rekursif
|
||||
# Sekarang proses submodule pasti akan membaca file ~/.gitconfig dan menemukan header tadi
|
||||
git clone --recurse-submodules https://git.datadunia.com/devops/wireguard-vpn.git .
|
||||
|
||||
# 4. PENTING: Hapus konfigurasi segera setelah selesai (Cleanup)
|
||||
# Gunakan perintah ini di langkah 'if: always()' jika di Gitea Actions
|
||||
git config --global --unset-all http."https://git.datadunia.com/".extraheader
|
||||
git config --global --unset core.askPass
|
||||
|
||||
# Debug
|
||||
ls -la app/frontend
|
||||
|
||||
Reference in New Issue
Block a user