fix: shallow clone with timeout to prevent hang
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user