Skip to content

Commit

Permalink
🛳️Docker image publishing automation workflow added - Adithya S K
Browse files Browse the repository at this point in the history
  • Loading branch information
adithya-s-k committed Sep 23, 2024
1 parent ead63a8 commit e1cbb9c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: |
cognitivelab/omniparse:latest
cognitivelab/omniparse:${{ github.sha }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit e1cbb9c

Please sign in to comment.