fix: shallow clone with timeout to prevent hang
Release / build (amd64) (push) Failing after 8s
Release / build (arm64) (push) Failing after 6s
Release / generate-latest-json (push) Has been skipped

This commit is contained in:
datadunia
2026-05-07 02:14:26 +07:00
parent 417fd99dbf
commit ac32038ebb
+5 -15
View File
@@ -21,11 +21,9 @@ jobs:
with: with:
submodules: false submodules: false
- name: Update submodules with repo-local auth - name: Clone WGRplane submodule (shallow)
run: | run: |
git -C . config http.extraheader "Authorization: Bearer ${{ gitea.token }}" timeout 60 git -c http.extraheader="Authorization: Bearer ${{ gitea.token }}" clone --depth 1 https://${{ gitea.server_url }}/hainzero/WGRplane.git app
git submodule update --init --recursive
git -C . config --unset http.extraheader
ls -la app/ # Debug ls -la app/ # Debug
- name: Setup Go - name: Setup Go
@@ -67,11 +65,9 @@ jobs:
with: with:
submodules: false submodules: false
- name: Update submodules with repo-local auth - name: Clone WGRplane submodule (shallow)
run: | run: |
git -C . config http.extraheader "Authorization: Bearer ${{ gitea.token }}" timeout 60 git -c http.extraheader="Authorization: Bearer ${{ gitea.token }}" clone --depth 1 https://${{ gitea.server_url }}/hainzero/WGRplane.git app
git submodule update --init --recursive
git -C . config --unset http.extraheader
ls -la app/ # Debug ls -la app/ # Debug
- name: Download all artifacts - name: Download all artifacts
@@ -107,16 +103,10 @@ jobs:
git checkout main git checkout main
- name: Commit and push latest.json - 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: | run: |
git add latest.json git add latest.json
git commit -m "Update latest.json for release ${{ gitea.ref_name }} [skip ci]" || echo "No changes to commit" 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 - name: Upload latest.json artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02