You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ci-integration.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,53 @@ jobs:
88
88
!!! note "Persisting baselines"
89
89
The baseline is stored in `.pacta/snapshots/`. Commit this directory to your repository, or use GitHub Actions cache/artifacts to persist it between runs.
90
90
91
+
### Pacta GitHub Action (Recommended)
92
+
93
+
The simplest way to get rich architectural PR comments. Uses `--format github` to generate a descriptive Markdown comment with structural changes, violation details, and architecture trends:
94
+
95
+
```yaml
96
+
name: Architecture Check
97
+
98
+
on:
99
+
pull_request:
100
+
branches: [main]
101
+
102
+
jobs:
103
+
architecture:
104
+
runs-on: ubuntu-latest
105
+
permissions:
106
+
pull-requests: write
107
+
steps:
108
+
- uses: actions/checkout@v4
109
+
- uses: akhundMurad/pacta@main
110
+
with:
111
+
model: architecture.yml
112
+
rules: rules.pacta.yml
113
+
baseline: baseline
114
+
```
115
+
116
+
The action will:
117
+
118
+
- Run `pacta scan` with `--format github` to produce a rich Markdown report
119
+
- Post (or update) a PR comment with structural changes, new/fixed violations, and architecture trends
120
+
- Fail the check if new violations are introduced (configurable via `fail-on-violations: false`)
0 commit comments