1
- name : CI/CD for Network Security MLOps Project
1
+ name : CI/CD for Network Security MLOps (No DVC)
2
2
3
3
on :
4
4
push :
7
7
branches : [main]
8
8
9
9
jobs :
10
- mlops_pipeline :
10
+ run_pipeline :
11
11
runs-on : ubuntu-latest
12
12
13
13
steps :
14
- - name : 🔄 Checkout Code
14
+ - name : 🔄 Checkout Repository
15
15
uses : actions/checkout@v3
16
16
17
- - name : 🐍 Set up Python 3.10
17
+ - name : 🐍 Set Up Python 3.10
18
18
uses : actions/setup-python@v4
19
19
with :
20
20
python-version : " 3.10"
@@ -24,33 +24,14 @@ jobs:
24
24
python -m pip install --upgrade pip
25
25
pip install -r requirements.txt
26
26
27
- - name : ⚙️ Set up DVC
28
- uses : iterative/setup-dvc@v1
29
-
30
- - name : 🔐 Configure DVC Remote (DagsHub S3 Style)
31
- run : |
32
- dvc remote add -f origin s3://dvc
33
- dvc remote modify origin endpointurl https://dagshub.com/Ananddd06/Network_Security_end_to_end_Mlops_DVC_Mlflow.s3
34
- dvc remote modify origin --local access_key_id ${{ secrets.DVC_ACCESS_KEY_ID }}
35
- dvc remote modify origin --local secret_access_key ${{ secrets.DVC_SECRET_ACCESS_KEY }}
36
-
37
- - name : ⬇️ Pull Data from DVC Remote
38
- run : |
39
- dvc pull || echo "No DVC data found or needed."
40
-
41
- - name : 🚀 Run MLOps Pipeline (app.py)
27
+ - name : 🚀 Run app.py MLOps Pipeline
42
28
run : |
43
29
python app.py
44
30
45
- - name : ✅ Track and Commit New Artifacts
31
+ - name : 📤 Push Changes to GitHub
46
32
run : |
47
- dvc add artifacts/NetworkSecurityTrainingPipeline || echo "No new artifacts"
48
- git config --global user.email "${{ github.actor }}@users.noreply.github.com"
49
33
git config --global user.name "${{ github.actor }}"
50
- git add artifacts/*.dvc artifacts/.gitignore || true
51
- git commit -m "Update artifacts via GitHub Actions" || echo "Nothing to commit"
52
- git push origin main || echo "Nothing to push"
53
-
54
- - name : ⬆️ Push Artifacts to DVC Remote
55
- run : |
56
- dvc push || echo "No new DVC files to push"
34
+ git config --global user.email "${{ github.actor }}@users.noreply.github.com"
35
+ git add .
36
+ git commit -m "🔁 Auto-update from pipeline run" || echo "No changes to commit"
37
+ git push origin main || echo "No changes to push"
0 commit comments