Skip to content

Tag, Build, and Push Docker Image #4

Tag, Build, and Push Docker Image

Tag, Build, and Push Docker Image #4

Workflow file for this run

name: Tag, Build, and Push Docker Image
on:
workflow_dispatch:
permissions:
contents: write
jobs:
tag-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Automatic Tagging
id: tag_version
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
- name: Log in to Docker Hub
uses: docker/login-action@v2
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: thecodingsheikh/deepeval-api:${{ steps.tag_version.outputs.new_tag }}