This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:ai:github-actions-azure-pipeline [2025/06/19 21:38] – ddehamer | wiki:ai:github-actions-azure-pipeline [2025/06/20 14:58] (current) – ddehamer | ||
|---|---|---|---|
| Line 82: | Line 82: | ||
| Git files: {{ : | Git files: {{ : | ||
| + | |||
| + | Have it on my repo: [[https:// | ||
| + | |||
| + | Actions Secrets: | ||
| + | |||
| + | {{: | ||
| ===== Final Working Commands ===== | ===== Final Working Commands ===== | ||
| Line 328: | Line 334: | ||
| joblib.dump(clf, | joblib.dump(clf, | ||
| print(" | print(" | ||
| + | </ | ||
| + | |||
| + | <code - .github/ | ||
| + | name: Train and Register Model in Azure ML | ||
| + | |||
| + | on: | ||
| + | push: | ||
| + | branches: [ main ] | ||
| + | |||
| + | jobs: | ||
| + | train-register: | ||
| + | runs-on: ubuntu-latest | ||
| + | |||
| + | env: | ||
| + | AZURE_SUBSCRIPTION_ID: | ||
| + | AZURE_TENANT_ID: | ||
| + | AZURE_CLIENT_ID: | ||
| + | AZURE_CLIENT_SECRET: | ||
| + | AZURE_RESOURCE_GROUP: | ||
| + | AZURE_WORKSPACE_NAME: | ||
| + | |||
| + | steps: | ||
| + | - name: ✅ Checkout code | ||
| + | uses: actions/ | ||
| + | |||
| + | - name: 🔐 Login to Azure | ||
| + | uses: azure/ | ||
| + | with: | ||
| + | creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
| + | |||
| + | - name: 🐍 Set up Python | ||
| + | uses: actions/ | ||
| + | with: | ||
| + | python-version: | ||
| + | |||
| + | - name: 📦 Install dependencies | ||
| + | run: | | ||
| + | python -m pip install --upgrade pip | ||
| + | pip install -r requirements.txt | ||
| + | az extension add -n ml -y | ||
| + | |||
| + | - name: 🚀 Submit Azure ML pipeline job | ||
| + | run: | | ||
| + | az ml job create \ | ||
| + | --file pipeline-job.yml \ | ||
| + | --resource-group $AZURE_RESOURCE_GROUP \ | ||
| + | --workspace-name $AZURE_WORKSPACE_NAME | ||
| </ | </ | ||