diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..4811ad5 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,37 @@ +name: CI for PR + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + # 测试编译 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + - run: | + yarn install + yarn only-build + tar caf dist.tar.xz dist + env: + CI: true + + #测试打包 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and Push Image + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: false