From ac32038ebba54bdd0e05951e8daa937b4d463c4f Mon Sep 17 00:00:00 2001 From: datadunia Date: Thu, 7 May 2026 02:14:26 +0700 Subject: [PATCH] fix: shallow clone with timeout to prevent hang --- .gitea/workflows/release.yaml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 1c5e01b..bd96ac2 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -21,11 +21,9 @@ jobs: with: submodules: false - - name: Update submodules with repo-local auth + - name: Clone WGRplane submodule (shallow) run: | - git -C . config http.extraheader "Authorization: Bearer ${{ gitea.token }}" - git submodule update --init --recursive - git -C . config --unset http.extraheader + timeout 60 git -c http.extraheader="Authorization: Bearer ${{ gitea.token }}" clone --depth 1 https://${{ gitea.server_url }}/hainzero/WGRplane.git app ls -la app/ # Debug - name: Setup Go @@ -67,11 +65,9 @@ jobs: with: submodules: false - - name: Update submodules with repo-local auth + - name: Clone WGRplane submodule (shallow) run: | - git -C . config http.extraheader "Authorization: Bearer ${{ gitea.token }}" - git submodule update --init --recursive - git -C . config --unset http.extraheader + timeout 60 git -c http.extraheader="Authorization: Bearer ${{ gitea.token }}" clone --depth 1 https://${{ gitea.server_url }}/hainzero/WGRplane.git app ls -la app/ # Debug - name: Download all artifacts @@ -107,16 +103,10 @@ jobs: git checkout main - name: Commit and push latest.json - env: - GIT_ASKPASS: ${{ gitea.token }} - GIT_AUTHOR_NAME: "Gitea Actions" - GIT_AUTHOR_EMAIL: "actions@gitea.com" - GIT_COMMITTER_NAME: "Gitea Actions" - GIT_COMMITTER_EMAIL: "actions@gitea.com" run: | git add latest.json git commit -m "Update latest.json for release ${{ gitea.ref_name }} [skip ci]" || echo "No changes to commit" - git push origin main + git -c http.extraheader="Authorization: Bearer ${{ gitea.token }}" push origin main - name: Upload latest.json artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02