openai/openai-java

Public

mirrored from https://github.com/openai/openai-javaAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
codex/harden-github-actions

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/detect-breaking-changes.yml

43lines · modecode

1name: CI
2on:
3 pull_request:
4 branches:
5 - main
6 - next
7
8permissions:
9 contents: read
10
11jobs:
12 detect_breaking_changes:
13 runs-on: 'ubuntu-latest'
14 name: detect-breaking-changes
15 if: github.repository == 'openai/openai-java'
16 steps:
17 - name: Calculate fetch-depth
18 run: |
19 echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV
20
21 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
22 with:
23 # Ensure we can check out the pull request base in the script below.
24 fetch-depth: ${{ env.FETCH_DEPTH }}
25 persist-credentials: false
26
27 - name: Set up Java
28 uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
29 with:
30 distribution: temurin
31 java-version: |
32 8
33 21
34 cache: gradle
35 - name: Set up Gradle
36 uses: gradle/gradle-build-action@fe583dc97e032f41ccc310ea5176f2d7306abbc4 # v2
37
38 - name: Detect breaking changes
39 run: |
40 # Try to check out previous versions of the breaking change detection script. This ensures that
41 # we still detect breaking changes when entire files and their tests are removed.
42 git checkout "${{ github.event.pull_request.base.sha }}" -- ./scripts/detect-breaking-changes 2>/dev/null || true
43 ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }}
44