2023-07-22 08:49:39 -06:00
|
|
|
name: Demo adding Build Scan® comment to PR
|
2021-12-17 10:49:41 -07:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [assigned, review_requested]
|
2024-01-01 17:13:16 -07:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
|
|
|
|
2021-12-08 12:51:41 -07:00
|
|
|
jobs:
|
2024-01-01 12:31:36 -07:00
|
|
|
successful-build-with-always-comment:
|
2021-12-08 12:51:41 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-04-04 15:12:03 -06:00
|
|
|
- name: Checkout project sources
|
2023-09-04 22:34:02 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-04-04 15:12:03 -06:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: ./
|
2024-01-01 11:58:02 -07:00
|
|
|
with:
|
2024-01-01 12:31:36 -07:00
|
|
|
add-job-summary-as-pr-comment: always
|
2022-04-04 15:12:03 -06:00
|
|
|
- name: Run build with Gradle wrapper
|
|
|
|
id: gradle
|
2022-04-05 09:45:02 -06:00
|
|
|
working-directory: .github/workflow-samples/kotlin-dsl
|
2022-04-04 15:12:03 -06:00
|
|
|
run: ./gradlew build --scan
|
2024-01-01 12:31:36 -07:00
|
|
|
|
|
|
|
successful-build-with-comment-on-failure:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout project sources
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Gradle
|
|
|
|
uses: ./
|
|
|
|
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:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout project sources
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Gradle
|
|
|
|
uses: ./
|
|
|
|
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
|