2023-07-22 14:49:39 +00:00
|
|
|
name: Demo adding Build Scan® comment to PR
|
2021-12-17 17:49:41 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [assigned, review_requested]
|
2024-01-02 00:13:16 +00:00
|
|
|
|
|
|
|
permissions:
|
2024-11-14 02:01:45 +00:00
|
|
|
contents: read
|
2024-01-02 00:13:16 +00:00
|
|
|
|
2021-12-08 19:51:41 +00:00
|
|
|
jobs:
|
2024-04-10 13:23:03 +00:00
|
|
|
build-distribution:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout sources
|
2024-11-14 19:19:48 +00:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2024-04-10 13:23:03 +00:00
|
|
|
- name: Build and upload distribution
|
|
|
|
uses: ./.github/actions/build-dist
|
|
|
|
|
2024-01-01 19:31:36 +00:00
|
|
|
successful-build-with-always-comment:
|
2024-11-14 02:01:45 +00:00
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
2024-04-10 13:23:03 +00:00
|
|
|
needs: build-distribution
|
2021-12-08 19:51:41 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-10 13:23:03 +00:00
|
|
|
- name: Checkout sources
|
2024-11-14 19:19:48 +00:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2024-04-10 13:23:03 +00:00
|
|
|
- name: Initialize integ-test
|
|
|
|
uses: ./.github/actions/init-integ-test
|
|
|
|
|
2022-04-04 21:12:03 +00:00
|
|
|
- name: Setup Gradle
|
2024-01-25 18:49:04 +00:00
|
|
|
uses: ./setup-gradle
|
2024-01-01 18:58:02 +00:00
|
|
|
with:
|
2024-01-01 19:31:36 +00:00
|
|
|
add-job-summary-as-pr-comment: always
|
2022-04-04 21:12:03 +00:00
|
|
|
- name: Run build with Gradle wrapper
|
|
|
|
id: gradle
|
2022-04-05 15:45:02 +00:00
|
|
|
working-directory: .github/workflow-samples/kotlin-dsl
|
2022-04-04 21:12:03 +00:00
|
|
|
run: ./gradlew build --scan
|
2024-01-01 19:31:36 +00:00
|
|
|
|
|
|
|
successful-build-with-comment-on-failure:
|
2024-11-14 02:01:45 +00:00
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
2024-04-10 13:23:03 +00:00
|
|
|
needs: build-distribution
|
2024-01-01 19:31:36 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-10 13:23:03 +00:00
|
|
|
- name: Checkout sources
|
2024-11-14 19:19:48 +00:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2024-04-10 13:23:03 +00:00
|
|
|
- name: Initialize integ-test
|
|
|
|
uses: ./.github/actions/init-integ-test
|
|
|
|
|
2024-01-01 19:31:36 +00:00
|
|
|
- name: Setup Gradle
|
2024-01-25 18:49:04 +00:00
|
|
|
uses: ./setup-gradle
|
2024-01-01 19:31:36 +00:00
|
|
|
with:
|
|
|
|
add-job-summary-as-pr-comment: on-failure
|
|
|
|
- name: Run build with Gradle wrapper
|
|
|
|
id: gradle
|
|
|
|
working-directory: .github/workflow-samples/kotlin-dsl
|
|
|
|
run: ./gradlew build --scan
|
|
|
|
|
|
|
|
failing-build-with-comment-on-failure:
|
2024-11-14 02:01:45 +00:00
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
2024-04-10 13:23:03 +00:00
|
|
|
needs: build-distribution
|
2024-01-01 19:31:36 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-10 13:23:03 +00:00
|
|
|
- name: Checkout sources
|
2024-11-14 19:19:48 +00:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2024-04-10 13:23:03 +00:00
|
|
|
- name: Initialize integ-test
|
|
|
|
uses: ./.github/actions/init-integ-test
|
|
|
|
|
2024-01-01 19:31:36 +00:00
|
|
|
- name: Setup Gradle
|
2024-01-25 18:49:04 +00:00
|
|
|
uses: ./setup-gradle
|
2024-01-01 19:31:36 +00:00
|
|
|
with:
|
|
|
|
add-job-summary-as-pr-comment: on-failure
|
|
|
|
- name: Run build with Gradle wrapper
|
|
|
|
id: gradle
|
|
|
|
working-directory: .github/workflow-samples/kotlin-dsl
|
|
|
|
run: ./gradlew no-a-real-task --scan
|
|
|
|
continue-on-error: true
|