gradle-build-action/.github/workflows/pr-build-scan-comment.yml
2022-04-02 12:33:04 -06:00

29 lines
822 B
YAML

name: Add a build scan comment to PR
on:
pull_request:
types: [assigned, review_requested]
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
- uses: ./
- id: gradle
working-directory: .github/workflows/samples/kotlin-dsl
run: ./gradlew help
- name: "Comment build scan url"
uses: actions/github-script@v5
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 }}'
})