fix: release 0.2.1 #16
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: at-mcp-server | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Aliyun Docker Registry | |
| run: echo ${{ secrets.ALIYUN_DOCKER_REGISTRY_PASSWORD }} | docker login --username=${{ secrets.ALIYUN_DOCKER_REGISTRY_USER }} --password-stdin registry.cn-shanghai.aliyuncs.com | |
| # Read version from version.txt file and set date | |
| - name: Get the version and date | |
| id: get_version | |
| run: | | |
| echo "VERSION=$(cat version.txt)" >> $GITHUB_ENV | |
| - name: Build, tag and push Docker image with cache | |
| uses: docker/build-push-action@v5.0.0 | |
| with: | |
| context: . # 使用at-web目录作为上下文 | |
| file: Dockerfile # Dockerfile的位置 | |
| push: true # 推送镜像到阿里云镜像仓库 | |
| tags: | | |
| registry.cn-shanghai.aliyuncs.com/datamini/asktable-mcp-server:${{ env.VERSION }} | |
| registry.cn-shanghai.aliyuncs.com/datamini/asktable-mcp-server:latest | |
| platforms: linux/amd64 | |
| # platforms: linux/amd64, linux/arm64 | |
| cache-from: type=gha # 启用 GitHub Actions 缓存,适用于跨工作流缓存 | |
| cache-to: type=gha,mode=max # 启用缓存并优化构建 |