Skip to content

Commit 4135b47

Browse files
committed
refactor(pr_compliance|main): switch to workflow_calls for PR Compliance gating
- Changed `pr-compliance.yml` trigger to `workflow_call` for improved modularity. - Updated `main.yml` to trigger PR workflows on `pull_request` and added dependency on PR Compliance. - Simplified workflow structure for better clarity and maintainability.
1 parent 24efd2c commit 4135b47

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ on:
44
push:
55
branches:
66
- master
7-
workflow_run:
8-
workflows: ["PR Compliance"]
9-
types: [completed]
7+
pull_request:
8+
types: [opened, edited, synchronize, reopened]
109
merge_group:
1110
schedule:
1211
- cron: '0 0 * * *'
@@ -20,8 +19,11 @@ concurrency:
2019
!startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}
2120
2221
jobs:
22+
pr_compliance:
23+
uses: ./.github/workflows/pr-compliance.yml
24+
2325
pre-commit:
24-
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
26+
needs: [pr_compliance]
2527
uses: ./.github/workflows/pre-commit.yml
2628
ubuntu:
2729
needs:

.github/workflows/pr-compliance.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: PR Compliance
22

33
on:
4-
pull_request:
5-
types: [opened, edited, synchronize, reopened]
4+
workflow_call:
65

76
jobs:
87
unit_tests:

0 commit comments

Comments
 (0)