Skip to content

Commit e1cbb9c

Browse files
committed
🛳️Docker image publishing automation workflow added - Adithya S K
1 parent ead63a8 commit e1cbb9c

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/docker-image.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Log in to Docker Hub
16+
uses: docker/login-action@v3
17+
with:
18+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
19+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
20+
21+
- name: Set up Docker Buildx
22+
uses: docker/setup-buildx-action@v3
23+
24+
- name: Build and push Docker image
25+
uses: docker/build-push-action@v5
26+
with:
27+
context: .
28+
file: ./Dockerfile
29+
push: true
30+
tags: |
31+
cognitivelab/omniparse:latest
32+
cognitivelab/omniparse:${{ github.sha }}
33+
34+
- name: Image digest
35+
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)