Skip to content

build: Add workflow file to build and push docker image to docker hub #1

build: Add workflow file to build and push docker image to docker hub

build: Add workflow file to build and push docker image to docker hub #1

name: Build and Push Docker image
on:
push:
branches:
- "docker-image"
jobs:
prepare-dataset:
runs-on: ubuntu-latest
environment: docker-container-registry
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: getwithashish/expchatbot:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}