actions/.github/workflows/demo-pr-build-scan-comment.yml

78 lines
2.2 KiB
YAML
Raw Permalink Normal View History

2023-07-22 14:49:39 +00:00
name: Demo adding Build Scan® comment to PR
on:
pull_request:
types: [assigned, review_requested]
permissions:
contents: read
2021-12-08 19:51:41 +00:00
jobs:
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
- name: Build and upload distribution
uses: ./.github/actions/build-dist
successful-build-with-always-comment:
permissions:
pull-requests: write
needs: build-distribution
2021-12-08 19:51:41 +00:00
runs-on: ubuntu-latest
steps:
- name: Checkout sources
2024-11-14 19:19:48 +00:00
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Setup Gradle
uses: ./setup-gradle
with:
add-job-summary-as-pr-comment: always
- name: Run build with Gradle wrapper
id: gradle
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew build --scan
successful-build-with-comment-on-failure:
permissions:
pull-requests: write
needs: 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
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Setup Gradle
uses: ./setup-gradle
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:
permissions:
pull-requests: write
needs: 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
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Setup Gradle
uses: ./setup-gradle
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