github-action
github-action copied to clipboard
Run `diff` against an uncommited file
Hi guys, thanks for the amazing product! I'm in the middle of POCing for my company's documentation needs. Deployment works well, but diff
is not fully suited for my use case.
I am not committing the specs file into our repository and instead generate it in our CI workflow. Is it possible to run diff
against the actual file inside the Github Action runner, similar to how deployment works?
name: diff OpenAPI
on:
pull_request:
branches:
- development
jobs:
api-diff:
if: ${{ github.event_name == 'pull_request' }}
name: Check API diff on Bump.sh
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate OpenAPI specs
run: // script to generate OpenAPI specs in ./openapi.json
- name: Comment pull request with API diff
uses: bump-sh/github-action@v1
with:
doc: <doc>
token: ${{ secrets.BUMPSH_SECRET }}
file: openapi.json
command: diff
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}