Improve sample for build-scan comment on PR

This commit is contained in:
Daz DeBoer 2022-04-04 15:12:03 -06:00
parent ff8a687227
commit cde360986c
No known key found for this signature in database
GPG Key ID: DD6B9F0B06683D5D
2 changed files with 16 additions and 18 deletions

View File

@ -6,16 +6,15 @@ jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
- uses: ./
- id: gradle
- name: Checkout project sources
uses: actions/checkout@v2
- name: Setup Gradle
uses: ./
- name: Run build with Gradle wrapper
id: gradle
working-directory: .github/workflows/samples/kotlin-dsl
run: ./gradlew help
- name: "Comment build scan url"
run: ./gradlew build --scan
- name: "Add build scan URL as PR comment"
uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}

View File

@ -330,15 +330,14 @@ jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
- uses: gradle/gradle-build-action@v2
- id: gradle
run: ./gradlew build
- name: "Comment build scan url"
- name: Checkout project sources
uses: actions/checkout@v2
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run build with Gradle wrapper
id: gradle
run: ./gradlew build --scan
- name: "Add build scan URL as PR comment"
uses: actions/github-script@v5
if: github.event_name == 'pull_request' && failure()
with: