Repository navigation
59 lines (53 loc) · 1.8 KB
/
Copy pathruling-diff-comment.yml
File metadata and controls
59 lines (53 loc) · 1.8 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Ruling Diff Comment
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
# Trigger on ruling JSON file changes
- 'its/ruling/src/test/resources/**/*.json'
# Uncomment to test action changes
- '.github/workflows/ruling-diff-comment.yml'
workflow_dispatch:
inputs:
pr-number:
description: 'Pull request number'
required: true
type: string
base-sha:
description: 'Base commit SHA for diff'
required: true
type: string
head-sha:
description: 'Head commit SHA for diff'
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
ruling-diff-comment:
runs-on: warp-custom-ubuntu-24-04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
submodules: true
- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
enable-cache: true
# Use the action from the branch we just pushed
- name: Post ruling diff comment
uses: SonarSource/core-languages-tooling-public/ruling-diff-comment@master
with:
pr-number: ${{ inputs.pr-number || github.event.pull_request.number }}
repository: ${{ github.repository }}
base-sha: ${{ inputs.base-sha || github.event.pull_request.base.sha }}
head-sha: ${{ inputs.head-sha || github.event.pull_request.head.sha }}
ruling-root: 'its/ruling/src/test/resources/expected'
sources-root: 'its/sources'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}