Skip to content

A ready-to-use CI/CD Pipeline for linting and pushing Protobuf files to the Buf Registry.

License

Notifications You must be signed in to change notification settings

fluent-ci-templates/buf-pipeline

Repository files navigation

Buf Pipeline

fluentci pipeline deno compatibility dagger-min-version ci

A ready-to-use CI/CD Pipeline for linting and pushing Protobuf files to the Buf Registry.

🚀 Usage

Run the following command in your project:

fluentci run buf_pipeline

Or, if you want to use it as a template:

fluentci init -t buf

This will create a .fluentci folder in your project.

Now you can run the pipeline with:

fluentci run .

🧩 Dagger Module

Use as a Dagger Module:

dagger install github.com/fluent-ci-templates/buf-pipeline@main

Call a function from this module:

dagger call format --src .
dagger call lint --src .
dagger call push --src . --token env:BUF_TOKEN

🛠️ Environment variables

Variable Description
BUF_TOKEN The Buf Registry token.

✨ Jobs

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>

👨‍💻 Programmatic usage

You can also use this pipeline programmatically:

import { lint, push } from "jsr:@fluentci/buf";

await lint(".");
await push(".", Deno.env.get("BUF_TOKEN")!);

About

A ready-to-use CI/CD Pipeline for linting and pushing Protobuf files to the Buf Registry.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages