Skip to content

Commit

Permalink
👷 ci generation
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Dec 26, 2024
1 parent bf2ee24 commit b2f5922
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,22 @@ jobs:
run: npm audit signatures
- name: Generate OpenAPI Client
run: npm run generate
- name: Get OpenAPI Spec
id: openapi
- name: Get OpenAPI YAML
id: yaml
run: spec="$(curl -LsSf ${{ env.OPENAPI_URL }})" echo spec="${spec}" >> ${GITHUB_OUTPUT}
env:
OPENAPI_URL: https://lm-v2-api-mock-data-f24357049a1b.herokuapp.com/v2/openapi
- name: Get OpenAPI JSON
id: json
uses: mikefarah/yq@master
with:
cmd: curl -LsSf "${{ env.OPENAPI_URL }}" | yq --output-format json
cmd: echo "${{ steps.yaml.outputs.spec }}" | yq --output-format json
env:
OPENAPI_URL: https://lm-v2-api-mock-data-f24357049a1b.herokuapp.com/v2/openapi
- name: Get OpenAPI Spec Version
id: version
run: |
version=$(echo "${{ steps.openapi.outputs.result }}" | jq -r .info.version)
version=$(echo "${{ steps.json.outputs.result }}" | jq -r .info.version)
echo version=${version} >> ${GITHUB_OUTPUT}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
Expand Down

0 comments on commit b2f5922

Please sign in to comment.