fix: shallow
This commit is contained in:
@@ -18,15 +18,21 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Clone repository with submodules
|
- name: Clone repository with submodules
|
||||||
run: |
|
run: |
|
||||||
# 1. Set config secara global agar terbaca oleh submodule
|
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
|
||||||
# Gunakan "token" atau "Bearer" sesuai konfigurasi Gitea Anda
|
|
||||||
git config --global http.extraheader "Authorization: Bearer ${{ secrets.MY_GITEA_TOKEN }}"
|
|
||||||
|
|
||||||
# 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 ""
|
git config --global core.askPass ""
|
||||||
|
|
||||||
# 3. Jalankan clone
|
# 3. Jalankan clone secara rekursif
|
||||||
git clone --recurse-submodules ${{ gitea.server_url }}/${{ gitea.repository }}.git .
|
# 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
|
# Debug
|
||||||
ls -la app/frontend
|
ls -la app/frontend
|
||||||
|
|||||||
Reference in New Issue
Block a user