Skip to content

Commit 2fc8918

Browse files
committed
Added ci/cd pipeline to push to dockerhub
1 parent 174c3d6 commit 2fc8918

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/prod.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Continuous Deployment (Prod)
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build-and-deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Docker login
16+
uses: docker/login-action@v2
17+
with:
18+
username: ${{ secrets.DOCKER_USERNAME }}
19+
password: ${{ secrets.DOCKER_SECRET }}
20+
21+
- name: Set up Docker Buildx
22+
uses: docker/setup-buildx-action@v2
23+
24+
- name: Build and push school image
25+
uses: docker/build-push-action@v4
26+
with:
27+
context: .
28+
file: Dockerfile
29+
push: true
30+
tags: 100xdevs/todo-app-week-39:${{ github.sha }}
31+

0 commit comments

Comments
 (0)