Skip to content

Commit 1956e3b

Browse files
Merge pull request #447 from harshau007/dockerhub-img-upload
Action for Docker Img Upload
2 parents 83418f3 + d98dfbe commit 1956e3b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/dockerhub.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Dockerhub
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
name: Uploading Img
15+
timeout-minutes: 30
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Building Docker Image
21+
run: docker build -t ${{ secrets.username }}/erp-backend:prod .
22+
- name: DockerHub Login
23+
run: docker login -u ${{ secrets.username }} -p ${{ secrets.pass }}
24+
- name: Uploading Image to DockerHub
25+
run: docker push ${{ secrets.username }}/erp-backend:prod

0 commit comments

Comments
 (0)