Skip to content

Commit 738c193

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

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI/CD Pipeline for Network Security MLOps
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
mlops_pipeline:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: 🔄 Checkout Repository
15+
uses: actions/checkout@v3
16+
17+
- name: 🐍 Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.10"
21+
22+
- name: 🧪 Install Dependencies
23+
run: |
24+
python -m venv venv
25+
source venv/bin/activate
26+
pip install --upgrade pip
27+
pip install -r requirements.txt
28+
29+
- name: ⚙️ Set up DVC
30+
uses: iterative/setup-dvc@v1
31+
32+
- name: ⬇️ Pull DVC Data (if using remote)
33+
run: |
34+
dvc pull || echo "No remote or data to pull."
35+
36+
- name: 🚀 Run Main Pipeline
37+
run: |
38+
source venv/bin/activate
39+
python main.py
40+
41+
- name: ✅ Commit Updated DVC Files
42+
run: |
43+
git config --global user.email "[email protected]"
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"

0 commit comments

Comments
 (0)