actions/.github/workflows/pr-build-scan-comment.yml

29 lines
814 B
YAML
Raw Normal View History

2021-12-08 19:51:41 +00:00
name: Add a build scan comment to PR
on:
pull_request:
types: [assigned, review_requested]
2021-12-08 19:51:41 +00:00
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
2021-12-08 19:51:41 +00:00
with:
distribution: temurin
2021-12-08 19:51:41 +00:00
java-version: 11
- uses: ./
- id: gradle
working-directory: __tests__/samples/kotlin-dsl
run: ./gradlew help
2021-12-08 19:51:41 +00:00
- name: "Comment build scan url"
uses: actions/github-script@v5
2021-12-08 19:51:41 +00:00
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
2021-12-08 19:51:41 +00:00
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'PR ready for review: ${{ steps.gradle.outputs.build-scan-url }}'
2021-12-08 19:51:41 +00:00
})