openai/openai-java
Publicmirrored from https://github.com/openai/openai-javaAvailable
.github/workflows/detect-breaking-changes.yml
35lines · modeblame
33c44437stainless-app[bot]1 years ago | 1 | name: CI |
| 2 | on: | |
| 3 | pull_request: | |
| 4 | branches: | |
| 5 | - main | |
| 6 | - next | |
| 7 | | |
| 8 | jobs: | |
| 9 | detect_breaking_changes: | |
| 10 | runs-on: 'ubuntu-latest' | |
| 11 | name: detect-breaking-changes | |
| 12 | if: github.repository == 'openai/openai-java' | |
| 13 | steps: | |
| 14 | - name: Calculate fetch-depth | |
| 15 | run: | | |
| 16 | echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV | |
| 17 | | |
| 18 | - uses: actions/checkout@v4 | |
| 19 | with: | |
| 20 | # Ensure we can check out the pull request base in the script below. | |
| 21 | fetch-depth: ${{ env.FETCH_DEPTH }} | |
| 22 | | |
| 23 | - name: Set up Java | |
| 24 | uses: actions/setup-java@v4 | |
| 25 | with: | |
| 26 | distribution: temurin | |
| 27 | java-version: | | |
| 28 | 8 | |
| 29 | 21 | |
| 30 | cache: gradle | |
| 31 | - name: Set up Gradle | |
| 32 | uses: gradle/gradle-build-action@v2 | |
| 33 | | |
| 34 | - name: Detect breaking changes | |
| 35 | run: ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }} |