Skip to content

ci: validate OpenAPI specs on every PR, publish only on master - #207

Merged
gibiw merged 2 commits into
masterfrom
ci/validate-specs-on-pr
Jul 14, 2026
Merged

ci: validate OpenAPI specs on every PR, publish only on master#207
gibiw merged 2 commits into
masterfrom
ci/validate-specs-on-pr

Conversation

@gibiw

@gibiw gibiw commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What

Split the publish workflow into two jobs:

  • validate — runs rdme openapi validate for the v1 and v2 specs on every pull request and push. It fails on any validation error, which blocks the PR from being merged.
  • publish — now needs: validate and is guarded by if: github.event_name == 'push', so ReadMe docs are synced only after changes land on master/main and only when validation passed.

Also bumps the readmeio/rdme action from v8 → v9, which ships the standalone openapi validate command used by the new job.

Why

Previously the workflow only ran on push to master/main and had no validation step — a broken spec could reach the sync stage. Now spec issues are caught on the PR before merge, and publishing is decoupled from PR runs.

Behavior

Event Jobs run
Pull request validate only (blocks PR on failure)
Push to master/main validatepublish

gibiw added 2 commits July 14, 2026 21:01
Add a validate job that runs rdme openapi validate for v1 and v2 specs
on every pull request and push. The job fails on any validation error,
blocking the PR from being merged.

The publish job now depends on validate and only runs on push events
(master/main), so ReadMe docs are synced exclusively after changes have
landed on the default branch. Bump the rdme action from v8 to v9, which
provides the standalone 'openapi validate' command.
Point rdme openapi validate at src.yaml with --workingDirectory so its
relative $ref paths (e.g. paths/attachments.yaml) resolve correctly,
matching how the publish job syncs the docs.
@gibiw
gibiw merged commit 954aecf into master Jul 14, 2026
2 checks passed
@gibiw
gibiw deleted the ci/validate-specs-on-pr branch July 14, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant