Skip to content

Commit

Permalink
Config file name to ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
Slavko Rihtaric committed Jul 4, 2024
1 parent aa96bb8 commit 3741a13
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/generate_sdk_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
types: [publish_sdk]
env:
GENERATOR_VERISON: "7.6.0"
CONFIG_FILE: "sdk-gen-config.json"
jobs:
sdk:
name: Generate SDK code
Expand Down Expand Up @@ -63,13 +64,13 @@ jobs:

- name: Set SDK version
run: |
cp .github/sdk-gen-config.json ${{ runner.temp }}/sdk-gen-config.json
sed -i "s/{VERSION}/${{ steps.version.outputs.result }}/g" ${{ runner.temp }}/sdk-gen-config.json
cat ${{ runner.temp }}/sdk-gen-config.json
cp .github/${{ env.CONFIG_FILE }} ${{ runner.temp }}/${{ env.CONFIG_FILE }}
sed -i "s/{VERSION}/${{ steps.version.outputs.result }}/g" ${{ runner.temp }}/${{ env.CONFIG_FILE }}
cat ${{ runner.temp }}/${{ env.CONFIG_FILE }}
- name: Generate SDK
run: |
java -jar ${{ runner.temp }}/openapi-generator-cli.jar generate -i ${{ runner.temp }}/openapi.yml -g csharp -o ./src -c ${{ runner.temp }}/sdk-gen-config.yml
java -jar ${{ runner.temp }}/openapi-generator-cli.jar generate -i ${{ runner.temp }}/openapi.yml -g csharp -o ./src -c ${{ runner.temp }}/${{ env.CONFIG_FILE }}
- name: Create Pull Request
id: cpr
Expand Down

0 comments on commit 3741a13

Please sign in to comment.