2021-12-08 12:51:41 -07:00
|
|
|
name: Add a build scan comment to PR
|
2021-12-17 10:49:41 -07:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [assigned, review_requested]
|
2021-12-08 12:51:41 -07:00
|
|
|
jobs:
|
|
|
|
gradle:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-01-16 16:18:09 -07:00
|
|
|
- uses: actions/setup-java@v2
|
2021-12-08 12:51:41 -07:00
|
|
|
with:
|
2022-01-17 14:28:53 -07:00
|
|
|
distribution: temurin
|
2021-12-08 12:51:41 -07:00
|
|
|
java-version: 11
|
2021-12-08 10:29:13 -07:00
|
|
|
- uses: ./
|
|
|
|
- id: gradle
|
2022-04-02 12:33:04 -06:00
|
|
|
working-directory: .github/workflows/samples/kotlin-dsl
|
2021-12-08 10:29:13 -07:00
|
|
|
run: ./gradlew help
|
2021-12-08 12:51:41 -07:00
|
|
|
- name: "Comment build scan url"
|
2022-01-16 23:45:15 +01:00
|
|
|
uses: actions/github-script@v5
|
2021-12-08 12:51:41 -07:00
|
|
|
with:
|
|
|
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
script: |
|
2022-01-16 23:45:15 +01:00
|
|
|
github.rest.issues.createComment({
|
2021-12-08 12:51:41 -07:00
|
|
|
issue_number: context.issue.number,
|
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
2021-12-17 10:49:41 -07:00
|
|
|
body: 'PR ready for review: ${{ steps.gradle.outputs.build-scan-url }}'
|
2021-12-08 12:51:41 -07:00
|
|
|
})
|