fluent-ci-templates / buf-pipeline

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

License:MIT License


Languages

Language:TypeScript 98.6%Language:Go 0.7%Language:Rust 0.5%Language:Nix 0.2%