Skip to content

Commit 05479c0

Browse files
document actions/checkout
1 parent e31d859 commit 05479c0

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
33

44
GitHub Actions for comparing OpenAPI specs and detecting breaking changes, based on [oasdiff](https://github.com/oasdiff/oasdiff).
55

6+
## Spec paths
7+
8+
The `base` and `revision` inputs accept:
9+
10+
- **File paths** — e.g. `openapi.yaml` or `specs/openapi.yaml` (files on disk)
11+
- **Git refs** — e.g. `origin/${{ github.base_ref }}:openapi.yaml` or `HEAD:openapi.yaml`
12+
- **URLs** — e.g. `https://example.com/openapi.yaml`
13+
14+
File paths and git refs require the repository to be checked out first:
15+
16+
```yaml
17+
- uses: actions/checkout@v6 # required for file paths and git refs
18+
- uses: oasdiff/oasdiff-action/breaking@v0.0.30
19+
with:
20+
base: 'origin/${{ github.base_ref }}:openapi.yaml'
21+
revision: 'HEAD:openapi.yaml'
22+
```
23+
24+
> `fetch-depth: 0` is **not** needed — the default shallow checkout is sufficient.
25+
26+
---
27+
628
## Spec sources
729

830
The `base` and `revision` inputs accept:

0 commit comments

Comments
 (0)