fix: use git fetch+reset instead of clone - workspace is a mounted volume
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 10s
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 10s
This commit is contained in:
@@ -20,32 +20,26 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
git config --global http.sslVerify false
|
git config --global http.sslVerify false
|
||||||
rm -rf /workspace
|
git config --global --add safe.directory /workspace/kibin/LexAI
|
||||||
git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git /workspace
|
git fetch origin
|
||||||
cd /workspace && git checkout ${{ gitea.sha }}
|
git reset --hard ${{ gitea.sha }}
|
||||||
working-directory: /
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
working-directory: /workspace
|
|
||||||
|
|
||||||
- name: Type check
|
- name: Type check
|
||||||
run: npm run typecheck
|
run: npm run typecheck
|
||||||
working-directory: /workspace
|
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: npm test -- --run
|
run: npm test -- --run
|
||||||
working-directory: /workspace
|
|
||||||
|
|
||||||
- name: Build extension
|
- name: Build extension
|
||||||
run: npm run build
|
run: npm run build
|
||||||
working-directory: /workspace
|
|
||||||
|
|
||||||
- name: Verify build output
|
- name: Verify build output
|
||||||
run: |
|
run: |
|
||||||
echo "✅ Build contents:"
|
echo "✅ Build contents:"
|
||||||
ls -la .output/chrome-mv3/
|
ls -la .output/chrome-mv3/
|
||||||
working-directory: /workspace
|
|
||||||
|
|
||||||
- name: Package as ZIP
|
- name: Package as ZIP
|
||||||
run: |
|
run: |
|
||||||
@@ -54,11 +48,9 @@ jobs:
|
|||||||
zip -r lexai-chrome-mv3-${VERSION}.zip .output/chrome-mv3/
|
zip -r lexai-chrome-mv3-${VERSION}.zip .output/chrome-mv3/
|
||||||
echo "PACKAGE_VERSION=${VERSION}" >> $GITHUB_ENV
|
echo "PACKAGE_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||||
echo "✅ Packaged: lexai-chrome-mv3-${VERSION}.zip"
|
echo "✅ Packaged: lexai-chrome-mv3-${VERSION}.zip"
|
||||||
working-directory: /workspace
|
|
||||||
|
|
||||||
- name: Publish to Gitea Package Registry
|
- name: Publish to Gitea Package Registry
|
||||||
run: |
|
run: |
|
||||||
cd /workspace
|
|
||||||
curl -f -s -X PUT \
|
curl -f -s -X PUT \
|
||||||
"https://git.juankibin.space/api/packages/kibin/generic/lexai-extension/${PACKAGE_VERSION}/lexai-chrome-mv3-${PACKAGE_VERSION}.zip" \
|
"https://git.juankibin.space/api/packages/kibin/generic/lexai-extension/${PACKAGE_VERSION}/lexai-chrome-mv3-${PACKAGE_VERSION}.zip" \
|
||||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user