-
Notifications
You must be signed in to change notification settings - Fork 210
53 lines (46 loc) · 1.45 KB
/
pull-request-helper.yml
File metadata and controls
53 lines (46 loc) · 1.45 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
name: Pull request helper
on:
push:
branches:
- 'dependabot/**/*'
permissions:
contents: write
jobs:
pull-request-helper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: true
- name: Set git user
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Update license report
env:
NUMBER: ${{ github.event.issue.number }}
run: |
./gradlew generateLicenseReport
git add licenses
# there's always going to one line difference due to the timestamp included in the report
if [[ $(git diff --cached --shortstat licenses) == " 1 file changed, 1 insertion(+), 1 deletion(-)" ]]
then
git reset HEAD licenses
git checkout -- licenses
exit 0 # success
fi
git commit -m "./gradlew generateLicenseReport"
- name: Update lock files
env:
NUMBER: ${{ github.event.issue.number }}
run: |
./gradlew resolveAndLockAll --write-locks
git add "*.lockfile"
if git diff --cached --quiet; then
exit 0 # success
fi
git commit -m "./gradlew resolveAndLockAll --write-locks"
- name: Push
run: git push