1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-09-21 12:20:13 +02:00
Stirling-PDF/.github/workflows/licenses-update.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.7 KiB
YAML
Raw Normal View History

2024-01-04 20:17:38 +01:00
name: License Report Workflow
on:
push:
branches:
- main
paths:
- 'build.gradle'
permissions:
contents: write
pull-requests: write
jobs:
generate-license-report:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Run Gradle Command
run: ./gradlew clean generateLicenseReport
- name: Move and Rename License File
run: |
mv build/reports/dependency-license/index.json src/main/resources/static/3rdPartyLicenses.json
2024-03-13 23:26:39 +01:00
- name: Set up git config
2024-01-04 21:59:52 +01:00
run: |
2024-03-13 23:26:39 +01:00
git config --global user.email "GitHub Action <action@github.com>"
git config --global user.name "GitHub Action <action@github.com>"
2024-01-04 21:59:52 +01:00
2024-03-13 23:26:39 +01:00
- name: Run git add
2024-01-04 20:17:38 +01:00
run: |
2024-03-13 23:26:39 +01:00
git add src/main/resources/static/3rdPartyLicenses.json
git diff --staged --quiet || echo "changes detected"
- 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
2024-01-04 21:59:52 +01:00