Skip to content

Commit 653e874

Browse files
committed
Added the main.yml
1 parent 738c193 commit 653e874

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI/CD Pipeline for Network Security MLOps
1+
name: CI/CD for Network Security MLOps
22

33
on:
44
push:
@@ -21,28 +21,25 @@ jobs:
2121

2222
- name: 🧪 Install Dependencies
2323
run: |
24-
python -m venv venv
25-
source venv/bin/activate
26-
pip install --upgrade pip
24+
python -m pip install --upgrade pip
2725
pip install -r requirements.txt
2826
2927
- name: ⚙️ Set up DVC
3028
uses: iterative/setup-dvc@v1
3129

32-
- name: ⬇️ Pull DVC Data (if using remote)
30+
- name: ⬇️ Pull DVC Data
3331
run: |
34-
dvc pull || echo "No remote or data to pull."
32+
dvc pull || echo "No DVC remote configured yet."
3533
36-
- name: 🚀 Run Main Pipeline
34+
- name: 🚀 Run MLOps Pipeline from app.py
3735
run: |
38-
source venv/bin/activate
39-
python main.py
36+
python app.py
4037
41-
- name: Commit Updated DVC Files
38+
- name: Track and Push Artifacts with DVC
4239
run: |
43-
git config --global user.email "your_email@example.com"
44-
git config --global user.name "Your Name"
45-
dvc add artifacts/NetworkSecurityTrainingPipeline
46-
git add artifacts/*.dvc artifacts/.gitignore
47-
git commit -m "Update artifacts via GitHub Actions" || echo "No changes to commit"
48-
git push || echo "Nothing to push"
40+
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
41+
git config --global user.name "${{ github.actor }}"
42+
dvc add artifacts/NetworkSecurityTrainingPipeline || echo "No new artifacts"
43+
git add artifacts/*.dvc artifacts/.gitignore || true
44+
git commit -m "GitHub Actions: Track updated artifacts" || echo "Nothing to commit"
45+
git push origin main || echo "Nothing to push"

0 commit comments

Comments
 (0)