fix: shallow
This commit is contained in:
@@ -16,14 +16,9 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
goarch: [amd64, arm64]
|
goarch: [amd64, arm64]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Clone repository with submodules
|
||||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
||||||
with:
|
|
||||||
submodules: false
|
|
||||||
|
|
||||||
- name: Clone WGRplane submodule (shallow)
|
|
||||||
run: |
|
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
|
ls -la app/ # Debug
|
||||||
|
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
@@ -56,25 +51,21 @@ jobs:
|
|||||||
name: wgrplane-linux-${{ matrix.goarch }}
|
name: wgrplane-linux-${{ matrix.goarch }}
|
||||||
path: 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:
|
generate-latest-json:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Clone repository with submodules
|
||||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
||||||
with:
|
|
||||||
submodules: false
|
|
||||||
|
|
||||||
- name: Clone WGRplane submodule (shallow)
|
|
||||||
run: |
|
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
|
ls -la app/ # Debug
|
||||||
|
|
||||||
- name: Download all artifacts
|
|
||||||
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
|
|
||||||
with:
|
|
||||||
path: artifacts
|
|
||||||
|
|
||||||
- name: Generate latest.json
|
- name: Generate latest.json
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ gitea.ref_name }}"
|
VERSION="${{ gitea.ref_name }}"
|
||||||
@@ -106,7 +97,7 @@ jobs:
|
|||||||
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 -c http.extraheader="Authorization: Bearer ${{ gitea.token }}" push origin main
|
git 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