diff --git a/.github/workflows/maven.yml b/.github/workflows/ci.yml similarity index 69% rename from .github/workflows/maven.yml rename to .github/workflows/ci.yml index b8f96f559..55f286d3c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,23 @@ name: CI -on: [create, pull_request, push] +on: [pull_request, push] jobs: + prepare_jobs: + name: 'Prepare: job optimization' + runs-on: ubuntu-latest + outputs: + pr_found: ${{ steps.pr.outputs.pr_found }} + steps: + - name: Get current PR + id: pr + uses: 8BitJonny/gh-get-current-pr@2.2.0 + with: + filterOutClosed: true + sha: ${{ github.event.pull_request.head.sha }} build: + needs: prepare_jobs + if: needs.prepare_jobs.outputs.pr_found == 'false' || github.event_name == 'pull_request' runs-on: ubuntu-latest strategy: matrix: diff --git a/README.md b/README.md index ae7a93b40..86372b324 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ | You **cannot** use this library for Android app development. Have a look at [adamint/spotify-web-api-kotlin](https://www.github.com/adamint/spotify-web-api-kotlin), [kaaes/spotify-web-api-android](https://www.github.com/kaaes/spotify-web-api-android) and [Spotify's Android SDK](https://developer.spotify.com/technologies/spotify-android-sdk/) and [see why](https://github.com/thelinmichael/spotify-web-api-java/issues/120#issuecomment-363266591). | # Spotify Web API Java -[![CI](https://github.com/spotify-web-api-java/spotify-web-api-java/actions/workflows/maven.yml/badge.svg)](https://github.com/spotify-web-api-java/spotify-web-api-java/actions/workflows/maven.yml) [![codecov](https://codecov.io/gh/spotify-web-api-java/spotify-web-api-java/branch/develop/graph/badge.svg)](https://codecov.io/gh/spotify-web-api-java/spotify-web-api-java) +[![CI](https://github.com/spotify-web-api-java/spotify-web-api-java/actions/workflows/ci.yml/badge.svg)](https://github.com/spotify-web-api-java/spotify-web-api-java/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/spotify-web-api-java/spotify-web-api-java/branch/develop/graph/badge.svg)](https://codecov.io/gh/spotify-web-api-java/spotify-web-api-java) This is a Java wrapper/client for the [Spotify Web API](https://developer.spotify.com/web-api/).