fix: clone to /tmp/lexai - avoid mounted workspace volume conflicts
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 35s
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 35s
This commit is contained in:
@@ -17,44 +17,46 @@ jobs:
|
|||||||
- name: Install system deps
|
- name: Install system deps
|
||||||
run: apt-get update -qq && apt-get install -y zip curl git ca-certificates -qq
|
run: apt-get update -qq && apt-get install -y zip curl git ca-certificates -qq
|
||||||
|
|
||||||
- name: Checkout
|
- name: Clone repository
|
||||||
run: |
|
run: |
|
||||||
git config --global http.sslVerify false
|
git config --global http.sslVerify false
|
||||||
git config --global --add safe.directory /workspace/kibin/LexAI
|
git clone --depth 1 --branch main ${{ gitea.server_url }}/${{ gitea.repository }}.git /tmp/lexai
|
||||||
git fetch origin
|
|
||||||
git reset --hard ${{ gitea.sha }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
working-directory: /tmp/lexai
|
||||||
|
|
||||||
- name: Type check
|
- name: Type check
|
||||||
run: npm run typecheck
|
run: npm run typecheck
|
||||||
|
working-directory: /tmp/lexai
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: npm test -- --run
|
run: npm test -- --run
|
||||||
|
working-directory: /tmp/lexai
|
||||||
|
|
||||||
- name: Build extension
|
- name: Build extension
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
working-directory: /tmp/lexai
|
||||||
|
|
||||||
- name: Verify build output
|
- name: Verify build output
|
||||||
run: |
|
run: ls -la .output/chrome-mv3/
|
||||||
echo "✅ Build contents:"
|
working-directory: /tmp/lexai
|
||||||
ls -la .output/chrome-mv3/
|
|
||||||
|
|
||||||
- name: Package as ZIP
|
- name: Package as ZIP
|
||||||
run: |
|
run: |
|
||||||
SHA=$(echo "${{ gitea.sha }}" | cut -c1-7)
|
SHA=$(echo "${{ gitea.sha }}" | cut -c1-7)
|
||||||
VERSION=$(node -p "require('./package.json').version")-${SHA}
|
VERSION=$(node -p "require('./package.json').version")-${SHA}
|
||||||
zip -r lexai-chrome-mv3-${VERSION}.zip .output/chrome-mv3/
|
zip -r /tmp/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: /tmp/lexai
|
||||||
|
|
||||||
- name: Publish to Gitea Package Registry
|
- name: Publish to Gitea Package Registry
|
||||||
run: |
|
run: |
|
||||||
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" \
|
"${{ gitea.server_url }}/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 }}" \
|
||||||
-T "lexai-chrome-mv3-${PACKAGE_VERSION}.zip"
|
-T "/tmp/lexai-chrome-mv3-${PACKAGE_VERSION}.zip"
|
||||||
echo "✅ Published to: https://git.juankibin.space/kibin/-/packages"
|
echo "✅ Published: https://git.juankibin.space/kibin/-/packages"
|
||||||
env:
|
env:
|
||||||
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
|
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
|
||||||
|
|||||||
Reference in New Issue
Block a user