Add action to check PR labels (#2469)

* Check PR labels

* update

* update

* update

* only use lable events

* remove env stuff

* add back types
This commit is contained in:
Joakim Sørensen 2021-01-26 14:21:05 +01:00 committed by GitHub
parent 8f54d7c8e9
commit ec4dfd2172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

19
.github/workflows/check_pr_labels.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Check PR
on:
pull_request:
branches: ["main"]
types: [opened, synchronize, reopened, labeled, unlabeled]
jobs:
init:
name: Check labels
runs-on: ubuntu-latest
steps:
- name: Check labels
run: |
labels=$(jq -r '.pull_request.labels[] | .name' ${{github.event_path }})
echo "$labels"
if [ "$labels" == "cla-signed" ]; then
exit 1
fi