docs: update docs #12
This file contains 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: 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 for both platforms and push | |
docker buildx build --platform linux/amd64,linux/arm64 -t devadathanmb/ktu-bot:latest --push . |