forked from opensearch-project/opensearch-java
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (29 loc) · 802 Bytes
/
Copy pathcode-generation.yml
File metadata and controls
34 lines (29 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Code Generation
on: [pull_request]
jobs:
up_to_date:
name: Ensure Generated Code Up To Date
runs-on: ubuntu-latest
steps:
- name: Checkout Java Client
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
cache: 'gradle'
- name: Run Code Generator
run: ./gradlew clean :java-codegen:run
- name: Check Has No Changes
shell: bash -eo pipefail {0}
run: |
output=$(git status --porcelain)
if [ -z "$output" ]; then
echo "Clean working directory"
exit 0
else
echo "Dirty working directory"
echo "$output"
exit 1
fi