File tree Expand file tree Collapse file tree 1 file changed +14
-24
lines changed Expand file tree Collapse file tree 1 file changed +14
-24
lines changed Original file line number Diff line number Diff line change 11name : Auto license report
22on :
3- pull_request :
4- types :
5- - opened
6- - synchronize
3+ push :
4+ branches :
5+ - ' renovate/**/*'
76
87concurrency :
9- group : ${{ github.workflow }}-${{ github.event.pull_request.number }}
8+ group : ${{ github.workflow }}-${{ github.ref }}
109 cancel-in-progress : true
1110
1211permissions :
1312 contents : read
1413
1514jobs :
16- check :
17- if : ${{ github.event.pull_request.draft == false }}
15+ auto-license-report :
16+ permissions :
17+ contents : write
1818 runs-on : ubuntu-latest
1919 steps :
2020 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -33,26 +33,16 @@ jobs:
3333 with :
3434 cache-read-only : true
3535
36- - name : Check out PR branch
37- env :
38- GH_TOKEN : ${{ github.token }}
39- run : gh pr checkout ${{ github.event.pull_request.number }}
36+ - name : Use CLA approved bot
37+ run : .github/scripts/use-cla-approved-bot.sh
4038
4139 - name : Update license report
4240 run : ./gradlew generateLicenseReport --no-build-cache
4341
44- - id : create-patch
45- name : Create patch file
42+ - name : Commit and push if there are changes
4643 run : |
47- git add -N --ignore-removal licenses
48- git diff > patch
49- if [ -s patch ]; then
50- echo "exists=true" >> "$GITHUB_OUTPUT"
44+ git add licenses
45+ if ! git diff --cached --quiet; then
46+ git commit -m "Update license report"
47+ git push
5148 fi
52-
53- - name : Upload patch file
54- if : steps.create-patch.outputs.exists == 'true'
55- uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
56- with :
57- path : patch
58- name : patch
You can’t perform that action at this time.
0 commit comments