fix: shallow
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user