Skip to content

Commit e15f53c

Browse files
Umut OezdemirUmut Oezdemir
Umut Oezdemir
authored and
Umut Oezdemir
committed
introduce continous deployment
1 parent 09d3cc6 commit e15f53c

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/cd.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
docker:
10+
name: Build and Push Docker Images
11+
runs-on: ubuntu-latest
12+
needs: [ci] # Docker image should be built after CI jobs are successful.
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v2
20+
21+
- name: Log in to Docker Hub
22+
uses: docker/login-action@v2
23+
with:
24+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
25+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
26+
27+
- name: Build and push Docker images using Docker Compose
28+
run: |
29+
docker-compose build
30+
docker-compose push

0 commit comments

Comments
 (0)