mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-12-25 00:02:10 -05:00
Improve sample for build-scan comment on PR
This commit is contained in:
parent
ff8a687227
commit
cde360986c
2 changed files with 16 additions and 18 deletions
17
.github/workflows/pr-build-scan-comment.yml
vendored
17
.github/workflows/pr-build-scan-comment.yml
vendored
|
@ -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}}
|
||||
|
|
17
README.md
17
README.md
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue