chore: update dependency #141
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: Docker Image CI | |
| on: | |
| push: | |
| paths-ignore: | |
| - "README.md" | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: huaji-bot-dotnet | |
| IMAGE_NAME_FULL: ghcr.io/nbtca/huaji-bot-dotnet | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU # 安装QEMU以支持arm64等多架构构建 | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx # 安装Docker Buildx以支持docker构建arm64等架构镜像 | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login DockerHub # 登录DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push # 构建并推送镜像到仓库 | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: "Dockerfile" | |
| push: ${{ github.event_name != 'pull_request' }} | |
| platforms: linux/amd64, linux/arm64 | |
| tags: | | |
| ${{ env.IMAGE_NAME_FULL }}:latest |