DivLoic / ccloud-registry-action

A Github Action checking schema compatibility of any project against Confluent Cloud Schema Registry
Apache License 2.0
9 stars 3 forks source link
actions avro cloud kafka schema schema-registry

Confluent Cloud Registry Action

Master Workflow Coverage Status FOSSA Status License

This Github Action validates the compatibility of your avro schemas against Confluent Cloud Schema Registry. Regardless of your programming language you can use it just by creating the two following files.

A schema.yml mapping schemas to subjects for validation

---
schemas:
  - subject: subject1-key
    file: schema0.avsc
# - ...

A Github Actions specification in the workflow folder (.github/workflows/*.yml)

uses: divloic/ccloud-registry-action@v0.0.1
with:
  avro-files-path: src/main/avro/
  avro-subject-yaml: schemas.yaml
  schema-registry-url: ${{ secrets.SCHEMA_REGISTRY_URL }}
  schema-registry-api-key: ${{ secrets.SCHEMA_REGISTRY_API_KEY }}
  schema-registry-secret-key: ${{ secrets.SCHEMA_REGISTRY_SECRET_KEY }}

Inputs

input description default
avro-files-path path to the schemas folder src/main/avro/
avro-subject-yaml path to the subject file /schema.yml
schema-registry-url url to the schema-registry ⚠️ required
schema-registry-api-key Confluent API key ⚠️ required
schema-registry-secret-key Confluent secret key ⚠️ required

Outputs

This action has no output yet. It simply logs or crashes in case of incompatibilities.

Example usage

You can find a complete example in this repository: ccloud-registry-example

Contribute

Licence

This project is licensed under Apache License 2.0

FOSSA Status