-
Notifications
You must be signed in to change notification settings - Fork 650
Open
Labels
Description
Currently, the configuration for openapi-generator for line-bot-sdk-php is written in three workflows, which is a source of errors. Additionally, in the repository managing the OpenAPI schema, it's easy to forget to synchronize the settings.
One solution is to provide just one configuration file or script in this repository and have the CIs simply use it.
-
line-bot-sdk-php/.github/workflows/generate-code.yml
Lines 31 to 51 in d012e5c
# Install openapi-generator-cli - run: echo "OPENAPI_GENERATOR_VERSION=7.10.0" >> $GITHUB_ENV - uses: actions/cache@v4 id: openapi-generator-cache env: cache-name: openapi-generator-cache with: path: ~/bin/openapitools key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.OPENAPI_GENERATOR_VERSION }} - if: steps.openapi-generator-cache.outputs.cache-hit != 'true' run: | mkdir -p ~/bin/openapitools curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli chmod u+x ~/bin/openapitools/openapi-generator-cli export PATH=$PATH:~/bin/openapitools/ OPENAPI_GENERATOR_VERSION=${{ env.OPENAPI_GENERATOR_VERSION }} openapi-generator-cli version - name: Generate codes run: | export PATH=$PATH:~/bin/openapitools/ bash tools/gen-oas-client.sh -
line-bot-sdk-php/.github/workflows/php-checks.yml
Lines 34 to 54 in d012e5c
- name: Install openapi-generator-cli run: echo "OPENAPI_GENERATOR_VERSION=7.10.0" >> $GITHUB_ENV - uses: actions/cache@v4 id: openapi-generator-cache env: cache-name: openapi-generator-cache with: path: ~/bin/openapitools key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.OPENAPI_GENERATOR_VERSION }} - if: steps.openapi-generator-cache.outputs.cache-hit != 'true' run: | mkdir -p ~/bin/openapitools curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh > ~/bin/openapitools/openapi-generator-cli chmod u+x ~/bin/openapitools/openapi-generator-cli export PATH=$PATH:~/bin/openapitools/ OPENAPI_GENERATOR_VERSION=${{ env.OPENAPI_GENERATOR_VERSION }} openapi-generator-cli version - name: Generate code run: | export PATH=$PATH:~/bin/openapitools/ bash tools/gen-oas-client.sh