mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-26 02:00:58 -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:
|
gradle:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout project sources
|
||||||
- uses: actions/setup-java@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
- name: Setup Gradle
|
||||||
distribution: temurin
|
uses: ./
|
||||||
java-version: 11
|
- name: Run build with Gradle wrapper
|
||||||
- uses: ./
|
id: gradle
|
||||||
- id: gradle
|
|
||||||
working-directory: .github/workflows/samples/kotlin-dsl
|
working-directory: .github/workflows/samples/kotlin-dsl
|
||||||
run: ./gradlew help
|
run: ./gradlew build --scan
|
||||||
- name: "Comment build scan url"
|
- name: "Add build scan URL as PR comment"
|
||||||
uses: actions/github-script@v5
|
uses: actions/github-script@v5
|
||||||
with:
|
with:
|
||||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
|
17
README.md
17
README.md
|
@ -330,15 +330,14 @@ jobs:
|
||||||
gradle:
|
gradle:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout project sources
|
||||||
- uses: actions/setup-java@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
- name: Setup Gradle
|
||||||
distribution: temurin
|
uses: gradle/gradle-build-action@v2
|
||||||
java-version: 11
|
- name: Run build with Gradle wrapper
|
||||||
- uses: gradle/gradle-build-action@v2
|
id: gradle
|
||||||
- id: gradle
|
run: ./gradlew build --scan
|
||||||
run: ./gradlew build
|
- name: "Add build scan URL as PR comment"
|
||||||
- name: "Comment build scan url"
|
|
||||||
uses: actions/github-script@v5
|
uses: actions/github-script@v5
|
||||||
if: github.event_name == 'pull_request' && failure()
|
if: github.event_name == 'pull_request' && failure()
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue