-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (44 loc) · 1.32 KB
/
00-Check-Code-Convention.yml
File metadata and controls
45 lines (44 loc) · 1.32 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
name: 00-Check-Code-Convention
on:
pull_request:
branches:
- main
- master
- "release/**"
workflow_dispatch:
inputs:
branch:
description: "Branch to test"
type: string
default: "main"
jobs:
job1:
name: Check coding convention
runs-on: ubuntu-22.04
steps:
- name: Trigger
run: echo "Triggered by ${{github.event_name}} event"
- name: Check Branch Input
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
if [ -z "${{ github.event.inputs.branch }}" ]; then
echo "Branch input is required for manual trigger."
exit 1
fi
fi
- name: Checkout
uses: actions/checkout@v4.1.7
with:
ref: "${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}"
submodules: true
fetch-depth: 0
- name: Log Current Branch and Commit
run: |
echo "Current branch: $(git rev-parse --abbrev-ref HEAD)"
echo "Current commit: $(git rev-parse HEAD)"
- name: Check Code Convention
uses: SiliconLabsSoftware/devs-coding-convention-tool@master
with:
exclude-regex: ""
codespell-ignore-words: ""
codespell-skip-paths: ""