Update licenses-update.yml (#911)
This commit is contained in:
parent
1af41f8ea5
commit
daf6486b86
1 changed files with 23 additions and 10 deletions
33
.github/workflows/licenses-update.yml
vendored
33
.github/workflows/licenses-update.yml
vendored
|
@ -32,17 +32,30 @@ jobs:
|
|||
run: |
|
||||
mv build/reports/dependency-license/index.json src/main/resources/static/3rdPartyLicenses.json
|
||||
|
||||
- name: Check for Changes
|
||||
id: git-check
|
||||
- name: Set up git config
|
||||
run: |
|
||||
git config --global user.email "GitHub Action <action@github.com>"
|
||||
git config --global user.name "GitHub Action <action@github.com>"
|
||||
|
||||
- name: Run git add
|
||||
run: |
|
||||
git add src/main/resources/static/3rdPartyLicenses.json
|
||||
git diff --staged --exit-code || echo "changes=true" >> $GITHUB_ENV
|
||||
git diff --staged --quiet || echo "changes detected"
|
||||
|
||||
- name: Commit and Push Changes
|
||||
if: env.changes == 'true'
|
||||
run: |
|
||||
git config --global user.name 'Stirling-PDF-Bot'
|
||||
git config --global user.email 'Stirling-PDF-Bot@stirlingtools.com'
|
||||
git commit -m "Update 3rd Party Licenses"
|
||||
git push
|
||||
- name: Create Pull Request
|
||||
if: env.CHANGES_DETECTED == 'true'
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: "Update 3rd Party Licenses"
|
||||
committer: GitHub Action <action@github.com>
|
||||
author: GitHub Action <action@github.com>
|
||||
signoff: true
|
||||
branch: update-3rd-party-licenses
|
||||
title: "Update 3rd Party Licenses"
|
||||
body: |
|
||||
Auto-generated by [create-pull-request][1]
|
||||
[1]: https://github.com/peter-evans/create-pull-request
|
||||
draft: false
|
||||
delete-branch: true
|
||||
|
||||
|
|
Loading…
Reference in a new issue