-
Notifications
You must be signed in to change notification settings - Fork 5
109 lines (91 loc) · 3.29 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Generate dependency diff
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
generate-diff-jvm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0
- name: Write Gradle build properties to `~/.gradle/gradle.properties`
run: |
mkdir -p ~/.gradle
printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties
shell: bash
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- name: Cache
uses: gradle/gradle-build-action@v2
with:
arguments: assemble -m
- id: dependency-diff-jvm
name: Generate dependency diff
uses: usefulness/dependency-tree-diff-action@v1
with:
configuration: 'runtimeClasspath'
project: 'jvm'
- uses: peter-evans/find-comment@v2
id: find_comment
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: Dependency diff (JVM)
- uses: peter-evans/create-or-update-comment@v3
if: ${{ steps.dependency-diff-jvm.outputs.text-diff != null || steps.find_comment.outputs.comment-id != null }}
with:
body: |
Dependency diff (JVM)
```diff
${{ steps.dependency-diff-jvm.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 }}
generate-diff-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with:
fetch-depth: 0
- name: Write Gradle build properties to `~/.gradle/gradle.properties`
run: |
mkdir -p ~/.gradle
printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties
shell: bash
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- name: Cache
uses: gradle/gradle-build-action@v2
with:
arguments: assemble -m
- id: dependency-diff-android
name: Generate dependency diff
uses: usefulness/dependency-tree-diff-action@v1
with:
configuration: 'runtimeClasspath'
project: 'android'
- uses: peter-evans/find-comment@v2
id: find_comment
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: Dependency diff (Android)
- uses: peter-evans/create-or-update-comment@v3
if: ${{ steps.dependency-diff-android.outputs.text-diff != null || steps.find_comment.outputs.comment-id != null }}
with:
body: |
Dependency diff (Android):
```diff
${{ steps.dependency-diff-android.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 }}