From eb691ebb44d5e4acfbf98c81083eebb594352f09 Mon Sep 17 00:00:00 2001 From: Forge Date: Fri, 6 Mar 2026 13:51:02 +0800 Subject: [PATCH] fix: use git fetch+reset instead of clone - workspace is a mounted volume --- .gitea/workflows/ci.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 350f52b..1ce08fc 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -20,32 +20,26 @@ jobs: - name: Checkout run: | git config --global http.sslVerify false - rm -rf /workspace - git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git /workspace - cd /workspace && git checkout ${{ gitea.sha }} - working-directory: / + git config --global --add safe.directory /workspace/kibin/LexAI + git fetch origin + git reset --hard ${{ gitea.sha }} - name: Install dependencies run: npm ci - working-directory: /workspace - name: Type check run: npm run typecheck - working-directory: /workspace - name: Run unit tests run: npm test -- --run - working-directory: /workspace - name: Build extension run: npm run build - working-directory: /workspace - name: Verify build output run: | echo "✅ Build contents:" ls -la .output/chrome-mv3/ - working-directory: /workspace - name: Package as ZIP run: | @@ -54,11 +48,9 @@ jobs: zip -r lexai-chrome-mv3-${VERSION}.zip .output/chrome-mv3/ echo "PACKAGE_VERSION=${VERSION}" >> $GITHUB_ENV echo "✅ Packaged: lexai-chrome-mv3-${VERSION}.zip" - working-directory: /workspace - name: Publish to Gitea Package Registry run: | - cd /workspace curl -f -s -X PUT \ "https://git.juankibin.space/api/packages/kibin/generic/lexai-extension/${PACKAGE_VERSION}/lexai-chrome-mv3-${PACKAGE_VERSION}.zip" \ -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \