From aa9bf7774e557c35b774e864fc7a39422c4992ff Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Wed, 8 Dec 2021 12:51:41 -0700 Subject: [PATCH] Add build-scan comment to any PRs --- .github/workflows/pr-build-scan-comment.yml | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/pr-build-scan-comment.yml diff --git a/.github/workflows/pr-build-scan-comment.yml b/.github/workflows/pr-build-scan-comment.yml new file mode 100644 index 0000000..0700026 --- /dev/null +++ b/.github/workflows/pr-build-scan-comment.yml @@ -0,0 +1,26 @@ +name: Add a build scan comment to PR +on: pull_request +jobs: + gradle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: gradle/gradle-build-action@v2 + id: gradle + with: + build-root-directory: __tests__/samples/kotlin-dsl + arguments: help + - name: "Comment build scan url" + uses: actions/github-script@v3 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Dummy comment for PR: ${{ steps.gradle.outputs.build-scan-url }}' + })