-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (51 loc) · 1.6 KB
/
dependencies.yml
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
60
61
name: Generate dependency diff
on:
pull_request:
push:
branches:
- master
- main
- trunk
- develop
- maine
- mane
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
generate-diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew assembleRelease -m
- id: dependency-diff
if: github.event_name == 'pull_request'
uses: usefulness/dependency-tree-diff-action@v2
with:
project: 'screenshot-testing-core'
configuration: releaseRuntimeClasspath
- uses: peter-evans/find-comment@v3
id: find_comment
if: github.event_name == 'pull_request'
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: Dependency diff
- uses: peter-evans/create-or-update-comment@v4
if: ${{ steps.dependency-diff.outputs.text-diff != null || steps.find_comment.outputs.comment-id != null }}
with:
body: |
Dependency diff:
```diff
${{ steps.dependency-diff.outputs.text-diff }}
```
edit-mode: replace
comment-id: ${{ steps.find_comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}