updates #1
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: 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 3: Build the Docker image | |
- name: Build Docker image | |
run: | | |
docker build -t devadathanmb/ktu-bot:latest . | |
# Step 4: Push the Docker image to Docker Hub | |
- name: Push Docker image to Docker Hub | |
run: | | |
docker push devadathanmb/ktu-bot:latest |