Fix Docker Hub image workflow

This commit is contained in:
kk K
2026-04-16 14:00:27 +08:00
parent 86598e2831
commit f549526b1e

View File

@@ -3,6 +3,10 @@ name: Docker Image Build and Push
on:
push:
branches: [ main ]
workflow_dispatch:
env:
IMAGE_NAME: ecs-controller
jobs:
build-and-push:
@@ -23,18 +27,11 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker image (amd64)
- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: ./
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/cdt-monitor:latest
- name: Build and Push Docker image (arm64)
uses: docker/build-push-action@v5
with:
context: ./
platforms: linux/arm64
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/cdt-monitor:arm
tags: |
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest