Skip to content

Commit f990728

Browse files
Create docker-image.yml
1 parent d09f5c2 commit f990728

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build and Push Docker Image to Docker Hub
2+
3+
on: push
4+
jobs:
5+
push_to_registry:
6+
name: push docker image to hub
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: check repository
10+
uses: actions/checkout@v4
11+
12+
- name: login to docker registry
13+
uses: docker/login-action@v3
14+
with:
15+
username: ${{secrets.DOCKER_USERNAME}}
16+
password: ${{secrets.DOCKER_PASSWORD}}
17+
18+
- name: build and push docker image to registry
19+
uses: docker/build-push-action@v5
20+
with:
21+
context: .
22+
push: true
23+
tags: mhmmdsyahputra/notes-app:latest

0 commit comments

Comments
 (0)