Spaces:
Sleeping
Sleeping
Update ci-cd.yml
Browse files- .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:
|
|
|
6 |
|
7 |
jobs:
|
8 |
-
|
9 |
runs-on: ubuntu-latest
|
|
|
10 |
steps:
|
11 |
-
- name:
|
12 |
-
uses:
|
|
|
|
|
|
|
13 |
with:
|
14 |
-
|
15 |
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
16 |
|
17 |
-
- name:
|
18 |
-
run:
|
19 |
|
20 |
-
- name: Docker
|
21 |
-
run:
|
|
|
|
|
|
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
|