Release v1.3.4+14 #851
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check labels | |
on: | |
pull_request: | |
types: [opened, labeled, unlabeled, synchronize, ready_for_review] | |
jobs: | |
label-check: | |
runs-on: ubuntu-latest | |
if: github.base_ref == 'main' && github.event.pull_request.draft == false | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- test: A Label (change type) | |
enforced_labels: "A0-ux,A1-bugfix,A2-technical" | |
- test: B Label (urgency) | |
enforced_labels: "B0-low,B1-medium,B2-priority" | |
- test: C Label (breaking changes) | |
enforced_labels: "C0-breaksnothing,C1-breaksapi" | |
steps: | |
- name: Label check | |
run: | | |
MATCH=$(jq -cn '${{ toJSON(github.event.pull_request.labels.*.name) }} as $USER_LABELS | | |
${{ toJSON(matrix.enforced_labels) }} | split(",") as $LABELS | | |
$USER_LABELS - ($USER_LABELS - $LABELS)') | |
if [[ "$MATCH" == '[]' ]]; then | |
exit 1 | |
fi |