fix: shallow

This commit is contained in:
datadunia
2026-05-07 11:08:53 +07:00
parent f71ef8c3e4
commit 35dcc2f15f
+10 -7
View File
@@ -18,14 +18,14 @@ jobs:
steps: steps:
- name: Clone repository with submodules - name: Clone repository with submodules
run: | run: |
# Gunakan Secret yang baru dibuat (MY_GITEA_TOKEN) # 1. Set config secara global agar terbaca oleh submodule
# Gitea menggunakan "token" atau "Bearer", coba salah satu yang paling cocok # Gunakan "token" atau "Bearer" sesuai konfigurasi Gitea Anda
AUTH_HEADER="Authorization: token ${{ secrets.MY_GITEA_TOKEN }}" git config --global http.extraheader "Authorization: token ${{ secrets.MY_GITEA_TOKEN }}"
export GIT_CONFIG_COUNT=1 # 2. Matikan prompt agar tidak hang jika otentikasi gagal
export GIT_CONFIG_KEY_0="http.extraheader" git config --global core.askPass ""
export GIT_CONFIG_VALUE_0="$AUTH_HEADER"
# 3. Jalankan clone
git clone --recurse-submodules ${{ gitea.server_url }}/${{ gitea.repository }}.git . git clone --recurse-submodules ${{ gitea.server_url }}/${{ gitea.repository }}.git .
# Debug # Debug
@@ -95,4 +95,7 @@ jobs:
- name: Cleanup Git Config - name: Cleanup Git Config
if: always() # Pastikan tetap jalan meski job gagal if: always() # Pastikan tetap jalan meski job gagal
run: | run: |
git config --global --unset-all url."https://token:${{ gitea.token }}@${{ gitea.server_url | replace("https://", "") }}/".insteadOf # git config --global --unset-all url."https://token:${{ gitea.token }}@${{ gitea.server_url | replace("https://", "") }}/".insteadOf
# Hapus header dan config agar tidak tersimpan di ~/.gitconfig host
git config --global --unset http.extraheader
git config --global --unset core.askPass