Skip to content

fix: Fix workflow

fix: Fix workflow #8

name: Build and Push Docker Image
on:
push:
branches:
- prod # Trigger branch
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code
- name: Checkout code
uses: actions/checkout@v2
# Step 2: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Step 3: Log in to Docker Hub using GitHub secrets
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Step 4: Build Docker image for arm64 only
- name: Build Docker image for arm64
run: |
# Ensure the builder supports multi-architecture
docker buildx create --use
# Build and push image only for arm64
docker buildx build --platform linux/arm64 -t devadathanmb/ktu-bot:latest --push .