feat: 将视图切换功能迁移到菜单栏 #118
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Push Docker Image | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - '*.md' | |
| - '.gitignore' | |
| workflow_dispatch: # 允许手动触发 | |
| env: | |
| DOCKER_IMAGE: cropflre/nowen | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 # ARM64 QEMU 模拟构建较慢,给足时间 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push (multi-arch) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| ${{ env.DOCKER_IMAGE }}:latest | |
| ${{ env.DOCKER_IMAGE }}:${{ github.sha }} | |
| # 暂时禁用缓存,确保 arm64 完整构建一次 | |
| no-cache: true | |
| provenance: false | |
| - name: Verify multi-arch manifest | |
| run: | | |
| echo "=== Checking manifest for multi-arch support ===" | |
| docker manifest inspect ${{ env.DOCKER_IMAGE }}:latest | grep -E '"architecture"|"os"' | |
| echo "=== Expected: both amd64 and arm64 ===" |