Spaces:
Sleeping
Sleeping
Merge branch 'eliawaefler:main' into sandramsc-dev
Browse files- .github/workflows/ci-cd.yml +9 -41
.github/workflows/ci-cd.yml
CHANGED
@@ -1,53 +1,21 @@
|
|
1 |
name: Build and Publish Docker Image to DockerHub
|
2 |
|
3 |
-
|
4 |
on:
|
5 |
push:
|
6 |
branches: ["main"]
|
7 |
|
8 |
jobs:
|
9 |
-
|
10 |
runs-on: ubuntu-latest
|
11 |
-
|
12 |
-
|
13 |
steps:
|
14 |
-
- name:
|
15 |
-
uses:
|
16 |
-
|
17 |
-
- name: Setup Python
|
18 |
-
uses: actions/setup-python@v2
|
19 |
with:
|
20 |
-
|
21 |
-
|
22 |
-
- name: Install dependencies
|
23 |
-
run: pip install -r requirements.txt
|
24 |
-
|
25 |
-
deploy:
|
26 |
-
runs-on: ubuntu-latest
|
27 |
-
needs: build
|
28 |
-
if: success()
|
29 |
-
|
30 |
-
steps:
|
31 |
-
- name: Build and Push Docker Image
|
32 |
-
run: |
|
33 |
-
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/dockerverifyrag:latest .
|
34 |
-
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
|
35 |
-
docker push ${{ secrets.DOCKERHUB_USERNAME }}/dockverifyrag:latest
|
36 |
-
|
37 |
-
|
38 |
-
update-readme:
|
39 |
-
runs-on: ubuntu-latest
|
40 |
-
needs: build
|
41 |
-
|
42 |
-
steps:
|
43 |
-
- name: Checkout code
|
44 |
-
uses: actions/checkout@v2
|
45 |
|
|
|
|
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
git config --global user.email "[email protected]"
|
50 |
-
git config --global user.name "GitHub Actions"
|
51 |
-
git add .
|
52 |
-
git commit -m "README.md has been updated"
|
53 |
-
git push
|
|
|
1 |
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
|
|
|
|
|
|
|
|
|
|