gradle-build-action/.github/workflows/pr-build-scan-comment.yml
Margen67 5b86c8d41f ci: Improvements
Upgrade checkout to v3.
Upgrade github-script to v6.
Upgrade CodeQL actions to v2.
Cleanup/formatting.
2022-05-18 18:48:33 -07:00

27 lines
880 B
YAML

name: Add a build scan comment to PR
on:
pull_request:
types: [assigned, review_requested]
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v3
- name: Setup Gradle
uses: ./
- 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@v6
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 }}'
})