Skip to content

Remove ignored files from tracking #3

Remove ignored files from tracking

Remove ignored files from tracking #3

Workflow file for this run

name: Build and Push Multi-Arch Docker Images
on:
push:
branches:
- feature/dev
- main # 当代码推送到 main 分支时触发
- dev # 或者 dev 分支
jobs:
build:
runs-on: ubuntu-latest
steps:
# 检出代码
- name: Checkout code
uses: actions/checkout@v3
# 设置 Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# 登录 Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# 设置多平台环境
- name: Set up QEMU for multi-platform builds
uses: docker/setup-qemu-action@v2
with:
platforms: all
# 构建多平台镜像
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/dev-mock-cli:latest