-
Notifications
You must be signed in to change notification settings - Fork 25
41 lines (37 loc) · 1.23 KB
/
component-diff-pr-comment.yml
File metadata and controls
41 lines (37 loc) · 1.23 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
name: Component Schema Diff PR Comment
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "packages/component-schemas/schemas/**"
- "packages/component-schemas/package.json"
jobs:
component-diff-comment:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate component diff report
id: diff
uses: ./.github/actions/generate-diff
with:
tool: component-diff-generator
base-ref: ${{ github.base_ref }}
head-ref: ${{ github.head_ref }}
repository: ${{ github.repository }}
format: markdown
output-file: /tmp/component-diff.md
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Create or update PR comment
uses: ./.github/actions/diff-pr-comment
with:
diff-type: component
diff-generated: ${{ steps.diff.outputs.diff-generated }}
diff-content: ${{ steps.diff.outputs.diff-content }}
pr-number: ${{ github.event.pull_request.number }}
github-token: ${{ secrets.GITHUB_TOKEN }}