Update licenses-update.yml (#911)

This commit is contained in:
Anthony Stirling 2024-03-13 22:26:39 +00:00 committed by GitHub
parent 1af41f8ea5
commit daf6486b86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,17 +32,30 @@ jobs:
run: | run: |
mv build/reports/dependency-license/index.json src/main/resources/static/3rdPartyLicenses.json mv build/reports/dependency-license/index.json src/main/resources/static/3rdPartyLicenses.json
- name: Check for Changes - name: Set up git config
id: git-check 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: | run: |
git add src/main/resources/static/3rdPartyLicenses.json 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 - name: Create Pull Request
if: env.changes == 'true' if: env.CHANGES_DETECTED == 'true'
run: | uses: peter-evans/create-pull-request@v3
git config --global user.name 'Stirling-PDF-Bot' with:
git config --global user.email 'Stirling-PDF-Bot@stirlingtools.com' token: ${{ secrets.GITHUB_TOKEN }}
git commit -m "Update 3rd Party Licenses" commit-message: "Update 3rd Party Licenses"
git push 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