Client #95
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Client | |
on: | |
workflow_run: | |
workflows: [ Build ] | |
types: [ completed ] | |
branches: [ main ] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
outputs: | |
openapi: ${{ steps.changes.outputs.openapi }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: File changes | |
uses: getsentry/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
openapi: | |
- iam_openapi_spec.yml | |
java-client: | |
runs-on: ubuntu-latest | |
needs: check | |
if: ${{ needs.check.outputs.openapi == 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: iam | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
repository: hwslabs/iam-java-client | |
path: client | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Move the spec file | |
run: | | |
mv iam/iam_openapi_spec.yml client/iam_openapi_spec.yml | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Generate Files | |
working-directory: client | |
run: | | |
gradle --stacktrace --debug generateClient | |
- name: Push changes | |
uses: actions-js/push@v1.3 | |
with: | |
github_token: ${{ secrets.CLIENT_GEN_TOKEN }} | |
directory: client | |
message: "Update OpenApi spec" | |
repository: hwslabs/iam-java-client | |
branch: main | |