Create action to check servicing label (#84038)
authorJuan Hoyos <19413848+hoyosjs@users.noreply.github.com>
Tue, 28 Mar 2023 19:17:01 +0000 (12:17 -0700)
committerGitHub <noreply@github.com>
Tue, 28 Mar 2023 19:17:01 +0000 (12:17 -0700)
.github/workflows/check-service-labels.yml [new file with mode: 0644]

diff --git a/.github/workflows/check-service-labels.yml b/.github/workflows/check-service-labels.yml
new file mode 100644 (file)
index 0000000..bcbdafa
--- /dev/null
@@ -0,0 +1,21 @@
+name: check-service-labels
+
+permissions:
+  pull-requests: read
+
+on:
+  pull_request:
+    branches:
+      - 'release/**'
+
+jobs:
+  check-labels:
+    runs-on: ubuntu-latest
+    steps:
+    - name: Check servicing labels
+      run:
+        if [ "${{ contains(github.event.pull_request.labels.*.name, 'Servicing-approved') }}" = "true" ]; then
+          exit 0
+        else
+          exit 1
+        fi