fix: shallow
This commit is contained in:
@@ -18,14 +18,14 @@ jobs:
|
||||
steps:
|
||||
- name: Clone repository with submodules
|
||||
run: |
|
||||
# Gunakan Secret yang baru dibuat (MY_GITEA_TOKEN)
|
||||
# Gitea menggunakan "token" atau "Bearer", coba salah satu yang paling cocok
|
||||
AUTH_HEADER="Authorization: token ${{ secrets.MY_GITEA_TOKEN }}"
|
||||
# 1. Set config secara global agar terbaca oleh submodule
|
||||
# Gunakan "token" atau "Bearer" sesuai konfigurasi Gitea Anda
|
||||
git config --global http.extraheader "Authorization: token ${{ secrets.MY_GITEA_TOKEN }}"
|
||||
|
||||
export GIT_CONFIG_COUNT=1
|
||||
export GIT_CONFIG_KEY_0="http.extraheader"
|
||||
export GIT_CONFIG_VALUE_0="$AUTH_HEADER"
|
||||
# 2. Matikan prompt agar tidak hang jika otentikasi gagal
|
||||
git config --global core.askPass ""
|
||||
|
||||
# 3. Jalankan clone
|
||||
git clone --recurse-submodules ${{ gitea.server_url }}/${{ gitea.repository }}.git .
|
||||
|
||||
# Debug
|
||||
@@ -95,4 +95,7 @@ jobs:
|
||||
- name: Cleanup Git Config
|
||||
if: always() # Pastikan tetap jalan meski job gagal
|
||||
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
|
||||
Reference in New Issue
Block a user