SANDRAMSC commited on
Commit
b7f9d2e
1 Parent(s): 1e9cd60

Update ci-cd.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/ci-cd.yml +16 -10
.github/workflows/ci-cd.yml CHANGED
@@ -2,20 +2,26 @@ name: Build and Publish Docker Image to DockerHub
2
 
3
  on:
4
  push:
5
- branches: ["main"]
 
6
 
7
  jobs:
8
- login:
9
  runs-on: ubuntu-latest
 
10
  steps:
11
- - name: Login to Docker Hub
12
- uses: docker/login-action@v3
 
 
 
13
  with:
14
- username: ${{ secrets.DOCKERHUB_USERNAME }}
15
- password: ${{ secrets.DOCKERHUB_TOKEN }}
16
 
17
- - name: Build the Docker image
18
- run: docker build . --file Dockerfile --tag ${{ secrets.DOCKERHUB_USERNAME }}/docverifyrag
19
 
20
- - name: Docker Push
21
- run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/docverifyrag
 
 
 
2
 
3
  on:
4
  push:
5
+ branches:
6
+ - main
7
 
8
  jobs:
9
+ build:
10
  runs-on: ubuntu-latest
11
+
12
  steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v3
15
+
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v2
18
  with:
19
+ python-version: 3.9
 
20
 
21
+ - name: Log in to Docker Hub
22
+ run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
23
 
24
+ - name: Build and push Docker image
25
+ run: |
26
+ docker build -t ${{ secrets.DOCKER_USERNAME }}/docverifyrag:latest .
27
+ docker push ${{ secrets.DOCKER_USERNAME }}/docverifyrag:latest