Skip to content

Commit

Permalink
Improve sample for build-scan comment on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Apr 4, 2022
1 parent ff8a687 commit cde3609
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/pr-build-scan-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cde3609

Please sign in to comment.