Skip to content

Commit

Permalink
Update generate-swagger.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
spoo-bar committed Jan 2, 2024
1 parent 1d98fdf commit 6d8b22d
Showing 1 changed file with 42 additions and 5 deletions.
47 changes: 42 additions & 5 deletions .github/workflows/generate-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,56 @@ on:
branches: [spoorthi/generate-swagger-before-release]

jobs:
generate:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
proto: ${{ steps.filter.outputs.proto }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
proto:
- 'proto/**'
proto-format:
runs-on: ubuntu-latest
needs: changes
permissions:
contents: write
if: ${{ needs.changes.outputs.proto == 'true' }}
steps:
- uses: actions/checkout@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Format Proto Files
run: make proto-format

- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Format Proto Files"
commit_options: '--no-verify'

proto-swagger:
runs-on: ubuntu-latest
needs: changes
permissions:
contents: write
if: ${{ needs.changes.outputs.proto == 'true' }}
steps:
- uses: actions/checkout@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Generate Swagger File
if: steps.filter.outputs.proto == 'true'
run: make proto-swagger-gen
run: make proto-swagger-gen

- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Generate Swagger Docs"
commit_options: '--no-verify'

0 comments on commit 6d8b22d

Please sign in to comment.