fix: shallow
Release / build (arm64) (push) Has been cancelled
Release / generate-latest-json (push) Has been cancelled
Release / build (amd64) (push) Has been cancelled

This commit is contained in:
datadunia
2026-05-07 04:19:49 +07:00
parent 20478191a3
commit 0feed113ac
+11 -20
View File
@@ -16,14 +16,9 @@ jobs:
matrix:
goarch: [amd64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
submodules: false
- name: Clone WGRplane submodule (shallow)
- name: Clone repository with submodules
run: |
timeout 60 git -c http.extraheader="Authorization: Bearer ${{ gitea.token }}" clone --depth 1 ${{ gitea.server_url }}/hainzero/WGRplane.git app
git clone --recurse-submodules -c http.extraheader="Authorization: Bearer ${{ gitea.token }}" ${{ gitea.server_url }}/${{ gitea.repository }}.git .
ls -la app/ # Debug
- name: Setup Go
@@ -56,25 +51,21 @@ jobs:
name: 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: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
submodules: false
- name: Clone WGRplane submodule (shallow)
- name: Clone repository with submodules
run: |
timeout 60 git -c http.extraheader="Authorization: Bearer ${{ gitea.token }}" clone --depth 1 ${{ gitea.server_url }}/hainzero/WGRplane.git app
git config --global url."https://token:${{ gitea.token }}@${{ gitea.server_url | replace("https://", "") }}/".insteadOf "${{ gitea.server_url }}/"
git clone --recurse-submodules ${{ gitea.server_url }}/${{ gitea.repository }}.git .
ls -la app/ # Debug
- name: Download all artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
path: artifacts
- name: Generate latest.json
run: |
VERSION="${{ gitea.ref_name }}"
@@ -106,7 +97,7 @@ jobs:
run: |
git add latest.json
git commit -m "Update latest.json for release ${{ gitea.ref_name }} [skip ci]" || echo "No changes to commit"
git -c http.extraheader="Authorization: Bearer ${{ gitea.token }}" push origin main
git push origin main
- name: Upload latest.json artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02