From 02f05a789d436c736ddfca72f30cd19799569d6d Mon Sep 17 00:00:00 2001 From: Michael Duong Date: Wed, 13 Sep 2023 22:36:07 +0100 Subject: [PATCH 1/6] enforce label --- .github/workflows/MLPipelinePullRequest.yml | 115 +++++++++++--------- 1 file changed, 63 insertions(+), 52 deletions(-) diff --git a/.github/workflows/MLPipelinePullRequest.yml b/.github/workflows/MLPipelinePullRequest.yml index 614a984..ef9ecde 100644 --- a/.github/workflows/MLPipelinePullRequest.yml +++ b/.github/workflows/MLPipelinePullRequest.yml @@ -11,72 +11,83 @@ permissions: write-all jobs: - Verify-Model: + Enforce-label: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Install packages to retrieve artifacts - env: - AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - run: | - pip install --upgrade pip - pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt + - uses: yogevbd/enforce-label-action@2.1.0 + with: + REQUIRED_LABELS_ANY: "major,minorr,patch" + REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['major','minor','patch']" + BANNED_LABELS: "banned" - - name: Retrieve artifacts (dvc.lock) - env: - AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - run: | - cd modules/ml-pipeline/src/pipeline/src - dvc pull -r experiments + # Verify-Model: - - name: Build Prediction docker Image - run: | - cd modules/ml-pipeline/src/pipeline/ - docker build . --file Prediction.Dockerfile --tag prediction_test + # runs-on: ubuntu-latest - - name: Run Prediction docker container - run: | - docker run prediction_test + # steps: + # - uses: actions/checkout@v3 + # - name: Install packages to retrieve artifacts + # env: + # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + # run: | + # pip install --upgrade pip + # pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt - Trigger-CML: + # - name: Retrieve artifacts (dvc.lock) + # env: + # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + # run: | + # cd modules/ml-pipeline/src/pipeline/src + # dvc pull -r experiments - runs-on: ubuntu-latest + # - name: Build Prediction docker Image + # run: | + # cd modules/ml-pipeline/src/pipeline/ + # docker build . --file Prediction.Dockerfile --tag prediction_test - steps: - - uses: actions/checkout@v3 - - name: Install packages to retrieve artifacts - run: | - pip install --upgrade pip - pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt + # - name: Run Prediction docker container + # run: | + # docker run prediction_test - - name: Retrieve artifacts (dvc.lock) - env: - AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - run: | - cd modules/ml-pipeline/src/pipeline/src - dvc pull -r experiments + # Trigger-CML: - - uses: actions/setup-python@v4 - - uses: iterative/setup-cml@v1 - - name: Generate report - env: - AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - cd modules/ml-pipeline/src/pipeline/src - echo "## Model metrics" > report.md + # runs-on: ubuntu-latest - # Compare metrics to master - git fetch --depth=1 origin master:master - dvc metrics diff --md --all master >> report.md + # steps: + # - uses: actions/checkout@v3 + # - name: Install packages to retrieve artifacts + # run: | + # pip install --upgrade pip + # pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt - cml comment create report.md + # - name: Retrieve artifacts (dvc.lock) + # env: + # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + # run: | + # cd modules/ml-pipeline/src/pipeline/src + # dvc pull -r experiments + + # - uses: actions/setup-python@v4 + # - uses: iterative/setup-cml@v1 + # - name: Generate report + # env: + # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + # REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # run: | + # cd modules/ml-pipeline/src/pipeline/src + # echo "## Model metrics" > report.md + + # # Compare metrics to master + # git fetch --depth=1 origin master:master + # dvc metrics diff --md --all master >> report.md + + # cml comment create report.md # # echo "## Residuals plot from model" >> report.md # # metrics_location=$(find . -maxdepth 10 -name "residuals.png") From 24f9469c0c04221368ac0650fe70ada6c1f3fe8d Mon Sep 17 00:00:00 2001 From: Michael Duong Date: Wed, 13 Sep 2023 22:44:22 +0100 Subject: [PATCH 2/6] test after new label --- .github/workflows/MLPipelinePullRequest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/MLPipelinePullRequest.yml b/.github/workflows/MLPipelinePullRequest.yml index ef9ecde..d9e8cb2 100644 --- a/.github/workflows/MLPipelinePullRequest.yml +++ b/.github/workflows/MLPipelinePullRequest.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: yogevbd/enforce-label-action@2.1.0 with: - REQUIRED_LABELS_ANY: "major,minorr,patch" + REQUIRED_LABELS_ANY: "major,minor,patch" REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['major','minor','patch']" BANNED_LABELS: "banned" From 192fcfdfc81e490faec8029970fc3b3f594f0c46 Mon Sep 17 00:00:00 2001 From: Michael Duong Date: Wed, 13 Sep 2023 22:50:07 +0100 Subject: [PATCH 3/6] add manual check --- .github/workflows/MLPipelinePullRequest.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/MLPipelinePullRequest.yml b/.github/workflows/MLPipelinePullRequest.yml index d9e8cb2..141d3df 100644 --- a/.github/workflows/MLPipelinePullRequest.yml +++ b/.github/workflows/MLPipelinePullRequest.yml @@ -12,15 +12,12 @@ permissions: write-all jobs: Enforce-label: - + if: ${{ github.event.label.name != 'major' }} || ${{ github.event.label.name != 'minor' }} || ${{ github.event.label.name != 'patch' }} runs-on: ubuntu-latest steps: - - uses: yogevbd/enforce-label-action@2.1.0 - with: - REQUIRED_LABELS_ANY: "major,minor,patch" - REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['major','minor','patch']" - BANNED_LABELS: "banned" + - name: No label associated with PR + run: exit(1) # Verify-Model: From bbd5cc757ef371e2e3e9055ffa89897871ac06f2 Mon Sep 17 00:00:00 2001 From: Michael Duong Date: Wed, 13 Sep 2023 23:01:14 +0100 Subject: [PATCH 4/6] add on label --- .github/workflows/MLPipelinePullRequest.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/MLPipelinePullRequest.yml b/.github/workflows/MLPipelinePullRequest.yml index 141d3df..a5b4d5a 100644 --- a/.github/workflows/MLPipelinePullRequest.yml +++ b/.github/workflows/MLPipelinePullRequest.yml @@ -6,18 +6,22 @@ on: # - "model-**" pull_request: branches: [ "master" ] + label: + types: ["created", "edited"] permissions: write-all jobs: - Enforce-label: + No-Label: if: ${{ github.event.label.name != 'major' }} || ${{ github.event.label.name != 'minor' }} || ${{ github.event.label.name != 'patch' }} runs-on: ubuntu-latest steps: - name: No label associated with PR - run: exit(1) + run: | + echo "Please choose one of these tags: 'major', 'major', 'patch'" + exit(1) # Verify-Model: From 1c3a8203d506ea126f662e9a0ab0fac8666f44af Mon Sep 17 00:00:00 2001 From: Michael Duong Date: Thu, 14 Sep 2023 23:00:23 +0100 Subject: [PATCH 5/6] re-add workflow steps --- .github/workflows/MLPipelinePostMerge.yml | 124 ++++++++++---------- .github/workflows/MLPipelinePullRequest.yml | 118 +++++++++---------- 2 files changed, 121 insertions(+), 121 deletions(-) diff --git a/.github/workflows/MLPipelinePostMerge.yml b/.github/workflows/MLPipelinePostMerge.yml index b3879e8..6ea18c5 100644 --- a/.github/workflows/MLPipelinePostMerge.yml +++ b/.github/workflows/MLPipelinePostMerge.yml @@ -42,36 +42,36 @@ jobs: run: | echo "Hello Patch" - # Promote-Model-To-Dev: - # if: github.event.pull_request.merged == true - # runs-on: ubuntu-latest + Promote-Model-To-Dev: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Install packages to retrieve artifacts - # run: | - # pip install --upgrade pip - # pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt + steps: + - uses: actions/checkout@v3 + - name: Install packages to retrieve artifacts + run: | + pip install --upgrade pip + pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt - # - name: Retrieve artifacts (dvc.lock) - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - # run: | - # cd modules/ml-pipeline/src/pipeline/src - # dvc pull -r experiments + - name: Retrieve artifacts (dvc.lock) + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + run: | + cd modules/ml-pipeline/src/pipeline/src + dvc pull -r experiments - # - name: Push artifacts to Dev - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - # run: | - # cd modules/ml-pipeline/src/pipeline/src - # dvc push -r dev + - name: Push artifacts to Dev + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + run: | + cd modules/ml-pipeline/src/pipeline/src + dvc push -r dev Register-New-Model-Dev: - # if: github.event.pull_request.merged == true + if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -104,49 +104,49 @@ jobs: # gto register test --repo https://github.com/Hestia-Homes/ML/ # echo "chicken" >> test.md - gto -v register ${REGISTER_MODEL_NAME} + # gto -v register ${REGISTER_MODEL_NAME} # gto assign regression --stage dev # gto show - # Register-Prediction-Image-Dev: - # needs: Promote-Model-To-Dev - # # needs: [Promote-Model-To-Dev, Register-New-Model-Dev] WILL ADD BACK ONCE REGISTER WORKS - # runs-on: ubuntu-latest + Register-Prediction-Image-Dev: + needs: Promote-Model-To-Dev + # needs: [Promote-Model-To-Dev, Register-New-Model-Dev] WILL ADD BACK ONCE REGISTER WORKS + runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Install packages to retrieve artifacts - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - # run: | - # pip install --upgrade pip - # pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt + steps: + - uses: actions/checkout@v3 + - name: Install packages to retrieve artifacts + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + run: | + pip install --upgrade pip + pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt - # - name: Retrieve artifacts (dvc.lock) - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - # run: | - # cd modules/ml-pipeline/src/pipeline/src - # dvc pull -r dev + - name: Retrieve artifacts (dvc.lock) + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + run: | + cd modules/ml-pipeline/src/pipeline/src + dvc pull -r dev - # - name: Build Prediction docker image (TODO - NEED LAMBDA IMAGE, need to add version from gto registry) - # run: | - # cd modules/ml-pipeline/src/pipeline/ - # REGISTER_MODEL_NAME=$(echo ${{ github.event.pull_request.head.ref }} | awk -F"-" '{print $1}') - # docker build . --file Prediction.Dockerfile --tag ${REGISTER_MODEL_NAME} + - name: Build Prediction docker image (TODO - NEED LAMBDA IMAGE, need to add version from gto registry) + run: | + cd modules/ml-pipeline/src/pipeline/ + REGISTER_MODEL_NAME=$(echo ${{ github.event.pull_request.head.ref }} | awk -F"-" '{print $1}') + docker build . --file Prediction.Dockerfile --tag ${REGISTER_MODEL_NAME} - # - name: ECR Login - Dev - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - # run: | - # echo "LOGIN TO ECR" + - name: ECR Login - Dev + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + run: | + echo "LOGIN TO ECR" - # - name: Push Prediction image to ECR - Dev - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - # run: | - # echo "PUSH TO ECR" + - name: Push Prediction image to ECR - Dev + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + run: | + echo "PUSH TO ECR" diff --git a/.github/workflows/MLPipelinePullRequest.yml b/.github/workflows/MLPipelinePullRequest.yml index a5b4d5a..52325e0 100644 --- a/.github/workflows/MLPipelinePullRequest.yml +++ b/.github/workflows/MLPipelinePullRequest.yml @@ -23,75 +23,75 @@ jobs: echo "Please choose one of these tags: 'major', 'major', 'patch'" exit(1) - # Verify-Model: + Verify-Model: - # runs-on: ubuntu-latest + runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Install packages to retrieve artifacts - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - # run: | - # pip install --upgrade pip - # pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt + steps: + - uses: actions/checkout@v3 + - name: Install packages to retrieve artifacts + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + run: | + pip install --upgrade pip + pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt - # - name: Retrieve artifacts (dvc.lock) - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - # run: | - # cd modules/ml-pipeline/src/pipeline/src - # dvc pull -r experiments + - name: Retrieve artifacts (dvc.lock) + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + run: | + cd modules/ml-pipeline/src/pipeline/src + dvc pull -r experiments - # - name: Build Prediction docker Image - # run: | - # cd modules/ml-pipeline/src/pipeline/ - # docker build . --file Prediction.Dockerfile --tag prediction_test + - name: Build Prediction docker Image + run: | + cd modules/ml-pipeline/src/pipeline/ + docker build . --file Prediction.Dockerfile --tag prediction_test - # - name: Run Prediction docker container - # run: | - # docker run prediction_test + - name: Run Prediction docker container + run: | + docker run prediction_test - # Trigger-CML: + Trigger-CML: - # runs-on: ubuntu-latest + runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Install packages to retrieve artifacts - # run: | - # pip install --upgrade pip - # pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt + steps: + - uses: actions/checkout@v3 + - name: Install packages to retrieve artifacts + run: | + pip install --upgrade pip + pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt - # - name: Retrieve artifacts (dvc.lock) - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - # run: | - # cd modules/ml-pipeline/src/pipeline/src - # dvc pull -r experiments + - name: Retrieve artifacts (dvc.lock) + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + run: | + cd modules/ml-pipeline/src/pipeline/src + dvc pull -r experiments - # - uses: actions/setup-python@v4 - # - uses: iterative/setup-cml@v1 - # - name: Generate report - # env: - # AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} - # REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # run: | - # cd modules/ml-pipeline/src/pipeline/src - # echo "## Model metrics" > report.md + - uses: actions/setup-python@v4 + - uses: iterative/setup-cml@v1 + - name: Generate report + env: + AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }} + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + cd modules/ml-pipeline/src/pipeline/src + echo "## Model metrics" > report.md - # # Compare metrics to master - # git fetch --depth=1 origin master:master - # dvc metrics diff --md --all master >> report.md + # Compare metrics to master + git fetch --depth=1 origin master:master + dvc metrics diff --md --all master >> report.md - # cml comment create report.md + cml comment create report.md - # # echo "## Residuals plot from model" >> report.md - # # metrics_location=$(find . -maxdepth 10 -name "residuals.png") - # # echo $metrics_location - # # cd $metric_location - # # echo "![](./residuals.png)" >> report.md + # echo "## Residuals plot from model" >> report.md + # metrics_location=$(find . -maxdepth 10 -name "residuals.png") + # echo $metrics_location + # cd $metric_location + # echo "![](./residuals.png)" >> report.md From a576b3e024066b71ed2fbe98b3ea5b0fc57dc367 Mon Sep 17 00:00:00 2001 From: Michael Duong Date: Thu, 14 Sep 2023 23:05:25 +0100 Subject: [PATCH 6/6] add enforce label action --- .github/workflows/MLPipelinePullRequest.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/MLPipelinePullRequest.yml b/.github/workflows/MLPipelinePullRequest.yml index 52325e0..9ac5602 100644 --- a/.github/workflows/MLPipelinePullRequest.yml +++ b/.github/workflows/MLPipelinePullRequest.yml @@ -14,14 +14,23 @@ permissions: write-all jobs: No-Label: - if: ${{ github.event.label.name != 'major' }} || ${{ github.event.label.name != 'minor' }} || ${{ github.event.label.name != 'patch' }} runs-on: ubuntu-latest - steps: - - name: No label associated with PR - run: | - echo "Please choose one of these tags: 'major', 'major', 'patch'" - exit(1) + - uses: yogevbd/enforce-label-action@2.1.0 + with: + REQUIRED_LABELS_ANY: "major,minor,patch" + REQUIRED_LABELS_ANY_DESCRIPTION: "Select at least one label ['major','minor','patch']" + BANNED_LABELS: "banned" + + # No-Label: + # if: ${{ github.event.label.name != 'major' }} || ${{ github.event.label.name != 'minor' }} || ${{ github.event.label.name != 'patch' }} + # runs-on: ubuntu-latest + + # steps: + # - name: No label associated with PR + # run: | + # echo "Please choose one of these tags: 'major', 'major', 'patch'" + # exit(1) Verify-Model: