mirror of
https://github.com/Hestia-Homes/ML.git
synced 2026-06-08 11:17:25 +00:00
test minor
This commit is contained in:
parent
aaac719571
commit
8bc5ab0a8c
1 changed files with 43 additions and 46 deletions
89
.github/workflows/MLPipelinePostMerge.yml
vendored
89
.github/workflows/MLPipelinePostMerge.yml
vendored
|
|
@ -16,7 +16,38 @@ permissions: write-all
|
|||
|
||||
jobs:
|
||||
Register-Major-Model-Dev:
|
||||
# if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'major')) }}
|
||||
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'major')) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install packages to register model
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt
|
||||
|
||||
- name: Register Model
|
||||
run: |
|
||||
REGISTER_MODEL_NAME=$(echo ${{ github.event.pull_request.head.ref }} | awk -F"-" '{print $1}')
|
||||
# REGISTER_MODEL_NAME=$(echo ${{github.ref_name}} | awk -F"-" '{print $1}')
|
||||
|
||||
git config user.name "Github-Bot"
|
||||
git config user.email "Github-Bot@no-reply.com"
|
||||
|
||||
latest_version=$(gto show ${REGISTER_MODEL_NAME}@latest --ref | awk -F"@v" '{print $2}')
|
||||
increment_version=$(echo ${latest_version} | awk -F'.' '{OFS="."; $1+=1; print}')
|
||||
|
||||
new_tag=${REGISTER_MODEL_NAME}@v${increment_version}
|
||||
|
||||
git tag -a ${new_tag} -m "Registering new Major Version"
|
||||
git push origin ${new_tag}
|
||||
|
||||
gto show >> MODEL_REGISTRY.md
|
||||
|
||||
Register-Minor-Model-Dev:
|
||||
# if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'minor')) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -37,53 +68,15 @@ jobs:
|
|||
git config user.email "Github-Bot@no-reply.com"
|
||||
|
||||
latest_version=$(gto show ${REGISTER_MODEL_NAME}@latest --ref | awk -F"@v" '{print $2}')
|
||||
increment_version=$(echo ${latest_version} | awk -F'.' '{OFS="."; $1+=1; print}')
|
||||
increment_version=$(echo ${latest_version} | awk 'BEGIN{FS=OFS="."} {$2++; print}')
|
||||
|
||||
new_tag=${REGISTER_MODEL_NAME}@v${increment_version}
|
||||
|
||||
git tag -a ${new_tag} -m "Registering new Major Version"
|
||||
git tag -a ${new_tag} -m "Registering new Minor Version"
|
||||
git push origin ${new_tag}
|
||||
|
||||
gto show >> MODEL_REGISTRY.md
|
||||
|
||||
|
||||
# git tag -a ${REGISTER_MODEL_NAME} -m "Registering new Major Version"
|
||||
# git push origin ${REGISTER_MODEL_NAME}
|
||||
|
||||
# gto register test --repo https://github.com/Hestia-Homes/ML/
|
||||
# echo "chicken" >> test.md
|
||||
|
||||
# gto register ${REGISTER_MODEL_NAME} --bump-major
|
||||
# gto assign regression --stage dev
|
||||
# gto show >> MODEL_REGISTRY.md
|
||||
|
||||
Register-Minor-Model-Dev:
|
||||
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'minor')) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install packages to register model
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt
|
||||
|
||||
- name: Register Model
|
||||
run: |
|
||||
REGISTER_MODEL_NAME=$(echo ${{ github.event.pull_request.head.ref }} | awk -F"-" '{print $1}')
|
||||
|
||||
git config user.name "Github-Bot"
|
||||
git config user.email "Github-Bot@no-reply.com"
|
||||
|
||||
# gto register test --repo https://github.com/Hestia-Homes/ML/
|
||||
# echo "chicken" >> test.md
|
||||
|
||||
# gto register ${REGISTER_MODEL_NAME} --bump-minor
|
||||
# gto assign regression --stage dev
|
||||
# gto show >> Model_Register.md
|
||||
|
||||
Register-Patch-Model-Dev:
|
||||
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'patch')) }}
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -100,16 +93,20 @@ jobs:
|
|||
- name: Register Model
|
||||
run: |
|
||||
REGISTER_MODEL_NAME=$(echo ${{ github.event.pull_request.head.ref }} | awk -F"-" '{print $1}')
|
||||
# REGISTER_MODEL_NAME=$(echo ${{github.ref_name}} | awk -F"-" '{print $1}')
|
||||
|
||||
git config user.name "Github-Bot"
|
||||
git config user.email "Github-Bot@no-reply.com"
|
||||
|
||||
# gto register test --repo https://github.com/Hestia-Homes/ML/
|
||||
# echo "chicken" >> test.md
|
||||
latest_version=$(gto show ${REGISTER_MODEL_NAME}@latest --ref | awk -F"@v" '{print $2}')
|
||||
increment_version=$(echo ${latest_version} | awk 'BEGIN{FS=OFS="."} {$3++; print}')
|
||||
|
||||
# gto register ${REGISTER_MODEL_NAME} --bump-major
|
||||
# gto assign regression --stage dev
|
||||
# gto show >> Model_Register.md
|
||||
new_tag=${REGISTER_MODEL_NAME}@v${increment_version}
|
||||
|
||||
git tag -a ${new_tag} -m "Registering new Minor Version"
|
||||
git push origin ${new_tag}
|
||||
|
||||
gto show >> MODEL_REGISTRY.md
|
||||
|
||||
Promote-Artefacts-To-Dev:
|
||||
if: github.event.pull_request.merged == true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue