mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-05-04 13:48:35 +02:00
Automatically add Job Summary as PR comment
Rather than requiring a separate step to add a PR comment, the `gradle-build-action` can now automatically add the Job Summary as a PR comment Fixes #1020
This commit is contained in:
parent
24e9e9dc6b
commit
34a07dced0
4 changed files with 52 additions and 13 deletions
13
.github/workflows/demo-pr-build-scan-comment.yml
vendored
13
.github/workflows/demo-pr-build-scan-comment.yml
vendored
|
@ -10,18 +10,9 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
- name: Setup Gradle
|
||||
uses: ./
|
||||
with:
|
||||
add-pr-comment: true
|
||||
- name: Run build with Gradle wrapper
|
||||
id: gradle
|
||||
working-directory: .github/workflow-samples/kotlin-dsl
|
||||
run: ./gradlew build --scan
|
||||
- name: "Add Build Scan URL as PR comment"
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'PR ready for review: ${{ steps.gradle.outputs.build-scan-url }}'
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue