Skip to content

Commit aa94c7e

Browse files
committed
Added the yml file
1 parent 6fa3628 commit aa94c7e

File tree

1 file changed

+10
-29
lines changed

1 file changed

+10
-29
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI/CD for Network Security MLOps Project
1+
name: CI/CD for Network Security MLOps (No DVC)
22

33
on:
44
push:
@@ -7,14 +7,14 @@ on:
77
branches: [main]
88

99
jobs:
10-
mlops_pipeline:
10+
run_pipeline:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: 🔄 Checkout Code
14+
- name: 🔄 Checkout Repository
1515
uses: actions/checkout@v3
1616

17-
- name: 🐍 Set up Python 3.10
17+
- name: 🐍 Set Up Python 3.10
1818
uses: actions/setup-python@v4
1919
with:
2020
python-version: "3.10"
@@ -24,33 +24,14 @@ jobs:
2424
python -m pip install --upgrade pip
2525
pip install -r requirements.txt
2626
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
4228
run: |
4329
python app.py
4430
45-
- name: ✅ Track and Commit New Artifacts
31+
- name: 📤 Push Changes to GitHub
4632
run: |
47-
dvc add artifacts/NetworkSecurityTrainingPipeline || echo "No new artifacts"
48-
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
4933
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

Comments
 (0)