Skip to content

Commit 89f1b93

Browse files
committed
ci: compliance: convert compliance to workflow_call
Add compliance to twister workflow as a the first step. If compliance fials, no twister will run. Signed-off-by: Anas Nashif <[email protected]>
1 parent cf73c17 commit 89f1b93

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/compliance.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
name: Compliance Checks
22

33
on:
4-
pull_request:
5-
types:
6-
- edited
7-
- opened
8-
- reopened
9-
- synchronize
4+
workflow_call:
105

116
jobs:
7+
check_compliance_push:
8+
if: github.event_name == 'push'
9+
runs-on: ubuntu-22.04
10+
name: Run compliance checks on patch series (PR)
11+
steps:
12+
- name: Do nothing
13+
run: |
14+
echo "Doing nothing"
15+
1216
check_compliance:
17+
if: github.event_name == 'pull_request'
1318
runs-on: ubuntu-22.04
1419
name: Run compliance checks on patch series (PR)
1520
steps:

.github/workflows/twister.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ concurrency:
2020
cancel-in-progress: true
2121

2222
jobs:
23+
compliance-check:
24+
uses: ./.github/workflows/compliance.yml
25+
2326
twister-build-prep:
27+
needs: compliance-check
2428
uses: ./.github/workflows/twister-prep.yaml
2529

2630
twister-build:

0 commit comments

Comments
 (0)