-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (44 loc) · 1.34 KB
/
ci-pr-format.yaml
File metadata and controls
48 lines (44 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: 'ci: PR Format'
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
concurrency:
group: ci-pr-format-${{ github.ref }}
cancel-in-progress: true
jobs:
format:
runs-on: ubuntu-latest
name: Formatting
timeout-minutes: 5
permissions:
issues: write
pull-requests: write
steps:
- name: Extract branch name
id: extract-branch
run: |
BRANCH_NAME="${{ github.head_ref }}"
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
- name: '🏷️ Validate Labels: Semver'
if: ${{ !startsWith(steps.extract-branch.outputs.branch_name, 'changeset-release/') }}
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: "semver:.*"
use_regex: true
- name: '🏷️ Validate Labels: Type'
if: ${{ !startsWith(steps.extract-branch.outputs.branch_name, 'changeset-release/') }}
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: "type:.*"
use_regex: true
- name: '🏷️ Validate Labels: Blocked'
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 0
labels: "blocked"
use_regex: true