Skip to content

Commit 4c5c7c3

Browse files
Git workflow to automatically change api files
Signed-off-by: Hanwen <[email protected]>
1 parent 9dd1d36 commit 4c5c7c3

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,36 @@ jobs:
191191
- name: Verify Generation of API client
192192
run: |
193193
git diff --exit-code --quiet -- api/client/src/ ':!api/client/src/.openapi-generator/FILES'
194+
generate-api-model:
195+
permissions:
196+
contents: write
197+
pull-requests: write
198+
name: API Model Generation
199+
runs-on: ubuntu-latest
200+
steps:
201+
- uses: actions/checkout@v2
202+
- uses: actions/setup-java@v1
203+
with:
204+
java-version: 11
205+
- run: |
206+
sudo npm install -g redoc-cli
207+
sudo snap install yq
208+
- working-directory: api
209+
run: ./gradlew buildSmithyModel
210+
- working-directory: api
211+
run: ./gradlew generatePythonClient
212+
- working-directory: api
213+
run: ./gradlew generatePythonServer
214+
- name: Commit change
215+
uses: stefanzweifel/git-auto-commit-action@v5
216+
with:
217+
commit_message: 'update api'
218+
194219
validate-external-slurmdbd-template:
195220
permissions:
196221
contents: write
197222
pull-requests: write
198-
name: External SlurmDBD Template Validation
223+
name: External SlurmDBD Template Generation
199224
runs-on: ubuntu-latest
200225
steps:
201226
- uses: actions/checkout@v2
@@ -211,7 +236,7 @@ jobs:
211236
run: |
212237
cdk synth --no-version-reporting
213238
cp cdk.out/ExternalSlurmdbdStack.template.json external-slurmdbd.json
214-
- name: Create a Pull Request
239+
- name: Commit change
215240
uses: stefanzweifel/git-auto-commit-action@v5
216241
with:
217242
commit_message: 'update slurmdbd'

0 commit comments

Comments
 (0)