add enforce label action

This commit is contained in:
Michael Duong 2023-09-14 23:05:25 +01:00
parent c589ed4c3b
commit a576b3e024

View file

@ -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: