fix: shallow
Release / build (amd64) (push) Failing after 5s
Release / build (arm64) (push) Failing after 4s
Release / generate-latest-json (push) Has been skipped

This commit is contained in:
datadunia
2026-05-07 05:10:19 +07:00
parent e2c807dc12
commit f47b50b857
+40 -2
View File
@@ -18,9 +18,21 @@ jobs:
steps: steps:
- name: Clone repository with submodules - name: Clone repository with submodules
run: | run: |
git config --global url."https://token:${{ gitea.token }}@${{ gitea.server_url | replace("https://", "") }}/".insteadOf "${{ gitea.server_url }}/" # 1. Bersihkan protokol https:// dari server_url menggunakan shell
RAW_URL="${{ gitea.server_url }}"
SERVER_HOST=${RAW_URL#*//} # Menghapus https://
# 2. Set konfigurasi git secara LOKAL untuk sesi shell ini saja
# Kita gunakan GIT_CONFIG_PARAMETERS agar tidak mengotori ~/.gitconfig host
export GIT_CONFIG_COUNT=1
export GIT_CONFIG_KEY_0="url.https://token:${{ gitea.token }}@${SERVER_HOST}/.insteadOf"
export GIT_CONFIG_VALUE_0="${{ gitea.server_url }}/"
# 3. Jalankan clone
git clone --recurse-submodules ${{ gitea.server_url }}/${{ gitea.repository }}.git . git clone --recurse-submodules ${{ gitea.server_url }}/${{ gitea.repository }}.git .
ls -la app/ # Debug
# Debug
ls -la app/
- name: Setup Go - name: Setup Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
@@ -52,6 +64,32 @@ jobs:
name: wgrplane-linux-${{ matrix.goarch }} name: wgrplane-linux-${{ matrix.goarch }}
path: wgrplane-linux-${{ matrix.goarch }} path: wgrplane-linux-${{ matrix.goarch }}
- 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
generate-latest-json:
needs: build
runs-on: ubuntu-latest
steps:
- name: Clone repository with submodules
run: |
# 1. Bersihkan protokol https:// dari server_url menggunakan shell
RAW_URL="${{ gitea.server_url }}"
SERVER_HOST=${RAW_URL#*//} # Menghapus https://
# 2. Set konfigurasi git secara LOKAL untuk sesi shell ini saja
# Kita gunakan GIT_CONFIG_PARAMETERS agar tidak mengotori ~/.gitconfig host
export GIT_CONFIG_COUNT=1
export GIT_CONFIG_KEY_0="url.https://token:${{ gitea.token }}@${SERVER_HOST}/.insteadOf"
export GIT_CONFIG_VALUE_0="${{ gitea.server_url }}/"
# 3. Jalankan clone
git clone --recurse-submodules ${{ gitea.server_url }}/${{ gitea.repository }}.git .
# Debug
ls -la app/
- name: Generate latest.json - name: Generate latest.json
run: | run: |
VERSION="${{ gitea.ref_name }}" VERSION="${{ gitea.ref_name }}"