fix: shallow
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user