A ready-to-use CI/CD Pipeline for linting and pushing Protobuf files to the Buf Registry.
Run the following command in your project:
fluentci run buf_pipelineOr, if you want to use it as a template:
fluentci init -t bufThis will create a .fluentci folder in your project.
Now you can run the pipeline with:
fluentci run .Use as a Dagger Module:
dagger install github.com/fluent-ci-templates/buf-pipeline@mainCall a function from this module:
dagger call format --src .
dagger call lint --src .
dagger call push --src . --token env:BUF_TOKEN| Variable | Description |
|---|---|
| BUF_TOKEN | The Buf Registry token. |
| Job | Description |
|---|---|
| lint | Lint your Protobuf files with buf. |
| format | Format your Protobuf files with buf. |
| push | Push your Protobuf files to the Buf Registry. |
push(
src: Directory | string,
token: Secret | string
): Promise<string>
format(
src: Directory | string
): Promise<Directory | string>
lint(src: Directory | string): Promise<string>You can also use this pipeline programmatically:
import { lint, push } from "jsr:@fluentci/buf";
await lint(".");
await push(".", Deno.env.get("BUF_TOKEN")!);