{"id":20252662,"url":"https://github.com/streamdal/schema-publisher","last_synced_at":"2025-04-10T23:21:47.616Z","repository":{"id":65159025,"uuid":"380889637","full_name":"streamdal/schema-publisher","owner":"streamdal","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-08T19:50:59.000Z","size":32101,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-03-15T00:46:10.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/streamdal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-28T03:01:45.000Z","updated_at":"2024-06-21T16:29:04.794Z","dependencies_parsed_at":"2023-02-10T11:16:00.099Z","dependency_job_id":null,"html_url":"https://github.com/streamdal/schema-publisher","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.09999999999999998,"last_synced_commit":"55b05107f9a09b491bb3c77989274dd594ad5d0e"},"previous_names":["batchcorp/schema-publisher"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdal%2Fschema-publisher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdal%2Fschema-publisher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdal%2Fschema-publisher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streamdal%2Fschema-publisher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streamdal","download_url":"https://codeload.github.com/streamdal/schema-publisher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248313174,"owners_count":21082812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T10:17:53.045Z","updated_at":"2025-04-10T23:21:47.584Z","avatar_url":"https://github.com/streamdal.png","language":"Go","readme":"# schema-publisher\n\n`schema-publisher` is a GitHub action for publishing schema updates to \n[Streamdal](https://streamdal.com).\n\nThis action will allow you to **avoid** having to manually update the schemas \nin the Streamdal console every time your schemas change.\n\n\u003csub\u003e**NOTE**: While this repo is intended for use with Github Actions, you can\nuse the `schema-publisher` tool to perform the schema update in any CI system.\n\n## Example Flow\n\n1. Your schemas are in a Github repo\n2. Upon creating a PR in your schema repo, CI runs against the PR and tests the schema\n3. Upon merging the PR, CI compiles the schemas and generates a _descriptor set_ file\n   1. `$ ./protoc --descriptor_set_out=FILE ...`\n4. The `schema-publisher` workflow is configured to point to the _descriptor set_\nartifact that was created in the previous step\n5. `schema-publisher` workflow updates the existing schema in Streamdal with the\nnew schema and includes the new schema version in the name\n\n\u003csub\u003e**NOTE**: If using `protobuf` with complex schemas, it is best to use\n`descriptor_set` for the `input_type`. While Streamdal and the `schema-publisher`\ntool support directory-based protobuf schemas, it is possible to run into errors\nduring schema updates if the source schemas have sophisticated directory \nstructure.\u003c/sub\u003e\n\n## Config\n\n| Flag          | Required | Description                                                         | \n|---------------|----------|---------------------------------------------------------------------|\n| `api_token`   | **YES**  | API token used for Streamdal API (dashboard -\u003e account -\u003e security) |\n| `schema_id`   | **YES**  | Schema ID in Streamdal (dashboard -\u003e collection -\u003e schema           |\n| `input`       | **YES**  | File or directory with schema                                       |\n| `input_type`  | No       | `descriptor_set` (default) OR `dir`                                 | \n| `schema_name` | No       | New \"friendly\" schema name (tip: set to current schema version)     |\n| `schema_type` | No       | `protobuf` (default) OR `avro`                                      |\n| `api_address` | No       | Override the Streamdal API endpoint                                 |\n| `output`      | No       | Optionally write `dir` artifact (zip file) to a file                |\n| `debug`       | No       | Display additional debug output when running workflow               |\n\n## Example Github Workflow\n\nYour `.github/workflows/foo.yaml` should look something like this:\n\n```yaml\nname: Bump version\non:\n  push:\n    branches:\n      - master\njobs:\n  build:\n    runs-on: ubuntu-latest\n    outputs:\n      new_tag: ${{ steps.create_tag.outputs.new_tag }}\n    steps:\n      - uses: actions/checkout@master\n      - name: Bump version and push tag\n        uses: mathieudutour/github-tag-action@v4.5\n        id: create_tag\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n\n  streamdal_push:\n    runs-on: ubuntu-latest\n    name: Update protobuf schema in Streamdal\n    needs: build\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v2\n      - name: Push new schemas\n        uses: batchcorp/schema-publisher@latest\n        id: publish\n        with:\n          api_token: '${{ secrets.STREAMDAL_API_TOKEN }}'\n          schema_id: '${{ secrets.STREAMDAL_SCHEMA_ID }}'\n          schema_name: '${{ github.repository }}: ${{ needs.build.outputs.new_tag }}'\n          input_type: descriptor_set\n          input: protoset.fds\n          debug: true\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamdal%2Fschema-publisher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreamdal%2Fschema-publisher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreamdal%2Fschema-publisher/lists"}