This repository has been archived by the owner on May 25, 2024. It is now read-only.
Merge pull request #188 from usefulness/renovate/gradle.doctor #296
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate dependency diff | |
on: | |
push: | |
branches: | |
- master | |
- main | |
- trunk | |
- develop | |
- maine | |
- mane | |
pull_request: | |
jobs: | |
generate-diff: | |
env: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- uses: gradle/gradle-build-action@v2 | |
- run: ./gradlew assembleRelease -m | |
- id: dependency-diff | |
if: github.event_name == 'pull_request' | |
uses: usefulness/dependency-tree-diff-action@v1 | |
with: | |
project: 'slidr' | |
configuration: releaseRuntimeClasspath | |
- uses: peter-evans/find-comment@v2 | |
id: find_comment | |
if: github.event_name == 'pull_request' | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body-includes: Dependency diff | |
- uses: peter-evans/create-or-update-comment@v3 | |
if: ${{ steps.dependency-diff.outputs.text-diff != null || steps.find_comment.outputs.comment-id != null }} | |
with: | |
body: | | |
Dependency diff: | |
```diff | |
${{ steps.dependency-diff.outputs.text-diff }} | |
``` | |
edit-mode: replace | |
comment-id: ${{ steps.find_comment.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
token: ${{ secrets.GITHUB_TOKEN }} |