change workflow to only work on the sapmodel- branchs

This commit is contained in:
Michael Duong 2023-10-04 15:49:19 +00:00
commit c5fa850f71
3 changed files with 9 additions and 4 deletions

View file

@ -10,7 +10,6 @@ on:
types:
- closed
branches:
- "master"
- "sapmodel-dev"
- "heatmodel-dev"
- "carbonmodel-dev"
@ -179,6 +178,8 @@ jobs:
pip install -r modules/ml-pipeline/src/pipeline/requirements/version_control/requirements.txt
- name: Register Model
env:
TARGET_BRANCH: ${{ github.base_ref }}
run: |
REGISTER_MODEL_NAME=$(echo ${{ github.event.pull_request.head.ref }} | awk -F"-" '{print $1}')
@ -206,11 +207,11 @@ jobs:
git tag -a ${new_tag} -m "Assigning stage dev to artifact ${REGISTER_MODEL_NAME} version ${latest_version}"
git push origin ${new_tag}
git checkout master
git checkout ${TARGET_BRANCH}
git fetch --all
git pull
gto show --json > MODEL_REGISTRY.md
git add .
git commit -m "Update Registry"
git push origin master
git push origin ${TARGET_BRANCH}

View file

@ -5,7 +5,7 @@ on:
# branches:
# - "model-**"
pull_request:
branches: [ "master", "sapmodel-dev", "heatmodel-dev", "carbonmodel-dev"]
branches: ["sapmodel-dev", "heatmodel-dev", "carbonmodel-dev"]
label:
types: ["created", "edited"]

View file

@ -10,7 +10,11 @@
"sap": {
"version": "v1.0.0",
"stage": {
<<<<<<< HEAD
"dev": null
=======
"dev": "v1.0.0"
>>>>>>> f1c8656cfb33ac42fba37aff71479af7be79eb2f
},
"registered": true,
"active": true