[AUTOMATED] Update: proto/docs/trails-api.gen.yaml #64
This file contains hidden or 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: Convert OpenAPI YAML to JSON | |
| on: | |
| push: | |
| paths: | |
| - 'api-reference/trails-api.gen.yaml' | |
| branches: | |
| - '**' | |
| jobs: | |
| convert: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Convert YAML to JSON | |
| run: pnpm run convert-openapi | |
| - name: Check for changes | |
| id: check_changes | |
| run: | | |
| git diff --exit-code api-reference/before-annotations-trails-api.gen.json || echo "changes=true" >> $GITHUB_OUTPUT | |
| - name: Commit and push if changed | |
| if: steps.check_changes.outputs.changes == 'true' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add api-reference/before-annotations-trails-api.gen.json | |
| git commit -m "chore: auto-convert OpenAPI YAML to JSON" | |
| git push | |