fix: change pull request trigger to pull_request for CI workflow #128
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: Lint and validate OpenAPI specs | |
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| lint: | |
| name: Lint OpenAPI definition | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out head branch | |
| uses: actions/checkout@v4 | |
| - name: Run OpenAPI Lint Action | |
| uses: mhiew/redoc-lint-github-action@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: openapi/workflow_execution_service.openapi.yaml | |
| diff: | |
| name: Show OpenAPI differences relative to target branch | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'pull_request' }} | |
| steps: | |
| - name: Check out head branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| path: head | |
| - name: Check out base branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.base.ref }} | |
| path: base | |
| - name: Run OpenAPI Diff Action | |
| uses: mvegter/[email protected] | |
| with: | |
| head-spec: head/openapi/workflow_execution_service.openapi.yaml | |
| base-spec: base/openapi/workflow_execution_service.openapi.yaml | |
| validate: | |
| name: Validate OpenAPI definition | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out head branch | |
| uses: actions/checkout@v4 | |
| - name: Run OpenAPI Validate Action | |
| uses: swaggerexpert/[email protected] | |
| env: | |
| PUPPETEER_NO_SANDBOX: "true" | |
| PUPPETEER_EXECUTABLE_PATH: "/usr/bin/chromium-browser" | |
| with: | |
| definition-file: openapi/workflow_execution_service.openapi.yaml |