| source-repo | Repository (owner/name) that owns the source contract. Defaults to the repository that triggered the workflow. | no | ${{ github.repository }} |
| source-token | Token used to read the source repo. Pass `secrets.GITHUB_TOKEN` from the workflow to use the default per-run token. | no | "" |
| source-ref | Git ref (branch/tag/sha) in the source repo to read files from. | no | ${{ github.ref }} |
| source-sha | Full SHA of the source commit being synced. Falls back to the source-ref when the caller does not provide it. Used in default PR/commit templates. | no | "" |
| source-paths | Comma-separated list of paths inside the source repo to copy, relative to the repo root. Each path is copied as-is into the corresponding destination-path on the consumer. | yes | — |
| consumers | Newline-separated list of consumer repos in the form `owner/name:branch:token-secret:commit-author`. The token-secret is the name of the GitHub Actions secret holding a token with write access to that consumer. The commit-author is `Name <email>` for the PR commits. Example:
tntons/writer-frontend:main:CONSUMER_TOKEN_FRONTEND:Frontend Bot <bot@example.com>
tntons/writer-backend:main:CONSUMER_TOKEN_BACKEND:Backend Bot <bot@example.com> | yes | — |
| destination-base | Base path inside each consumer repo. Files from source-paths are copied under this path. For example, if destination-base is `vendor/api-contract` and source-paths is `index.js,index.d.ts`, the consumer ends up with `vendor/api-contract/index.js` and `vendor/api-contract/index.d.ts`. | yes | — |
| pr-title | Title template for the sync PR. | no | chore(contract): sync from {source-repo}@{source-ref} |
| pr-body | Body template for the sync PR. | no |
This PR was opened automatically by the sync-api-contract action.
Source: {source-repo}@{source-ref}
Destination base: {destination-base}
Please review the diff and run the project standard CI before merging.
If the contract change is intentional, approve and merge. If not, close
the PR and the source repo should be reverted. |
| pr-branch | Branch name template for the sync PR. | no | chore/sync-api-contract |
| pr-label | Label applied to sync PRs (created if missing). | no | api-contract-sync |
| commit-message | Commit message used when updating the vendor copy. | no | chore(contract): sync from {source-repo}@{source-ref} |
| fail-on-error | If true, the action fails the workflow when any consumer cannot be synced. If false, errors are logged and the action exits 0 so a single broken consumer does not block the others. | no | true |