Spaces:
Runtime error
Runtime error
Added configurations to ci-cd.yml
Browse files- .github/{ci.yml → ci-cd.yml} +0 -0
- ci-cd.yml +53 -0
.github/{ci.yml → ci-cd.yml}
RENAMED
File without changes
|
ci-cd.yml
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Build and Publish Docker Image to DockerHub
|
2 |
+
|
3 |
+
|
4 |
+
on:
|
5 |
+
push:
|
6 |
+
branches: ["main"]
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
build:
|
10 |
+
runs-on: ubuntu-latest
|
11 |
+
|
12 |
+
|
13 |
+
steps:
|
14 |
+
- name: Checkout code
|
15 |
+
uses: actions/checkout@v3
|
16 |
+
|
17 |
+
- name: Setup Python
|
18 |
+
uses: actions/setup-python@v2
|
19 |
+
with:
|
20 |
+
python-version: 3.9
|
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 |
+
- name: Update README
|
48 |
+
run: |
|
49 |
+
git config --global user.email "actions@github.com"
|
50 |
+
git config --global user.name "GitHub Actions"
|
51 |
+
git add .
|
52 |
+
git commit -m "README.md has been updated"
|
53 |
+
git push
|