https://github.com/fluent-ci-templates/bun-pipeline
A ready-to-use CI/CD Pipeline and jobs for Bun projects.
https://github.com/fluent-ci-templates/bun-pipeline
bun cicd dagger dagger-functions deno deno-module devops pipeline typescript
Last synced: 4 months ago
JSON representation
A ready-to-use CI/CD Pipeline and jobs for Bun projects.
- Host: GitHub
- URL: https://github.com/fluent-ci-templates/bun-pipeline
- Owner: fluent-ci-templates
- License: mit
- Created: 2023-07-04T17:16:31.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-28T08:46:57.000Z (over 1 year ago)
- Last Synced: 2025-04-21T17:54:29.471Z (about 1 year ago)
- Topics: bun, cicd, dagger, dagger-functions, deno, deno-module, devops, pipeline, typescript
- Language: TypeScript
- Homepage:
- Size: 268 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Bun Pipeline
[](https://pkg.fluentci.io/bun_pipeline)
[](https://deno.land/x/bun_pipeline)

[](https://dagger.io)
[](https://jsr.io/@fluentci/bun)
[](https://codecov.io/gh/fluent-ci-templates/bun-pipeline)
[](https://github.com/fluent-ci-templates/bun-pipeline/actions/workflows/ci.yml)
A ready-to-use CI/CD Pipeline for your [Bun](https://bun.sh) projects.

## 🚀 Usage
Run the following command:
```bash
fluentci run bun_pipeline
```
Or, if you want to use it as a template:
```bash
fluentci init -t bun
```
This will create a `.fluentci` folder in your project.
Now you can run the pipeline with:
```bash
fluentci run .
```
Or simply:
```bash
fluentci
```
## 🧩 Dagger Module
Use as a [Dagger](https://dagger.io) Module:
```bash
dagger install github.com/fluent-ci-templates/bun-pipeline@main
```
Call a function from the module:
```bash
dagger call build --src . \
--compile \
--outfile example \
--entrypoints index.ts
dagger call test --src .
dagger call run --command build --src .
```
## 🛠️ Environment variables
| Variable | Description |
| ------------ | ------------------------------------------------ |
| NODE_VERSION | The Node.js version to use. Defaults to `18.16.1`|
| BUN_VERSION | The Bun version to use. Defaults to `latest` |
## ✨ Jobs
| Job | Description |
| ------ | -------------------------------------- |
| build | Transpile and bundle one or more files |
| run | Run a command |
| test | Run the tests |
```typescript
build(
src: string | Directory | undefined = ".",
entrypoints: string[] = ["index.ts"],
outfile?: string,
bunVersion: string = "latest",
target?: string,
compile: boolean = false,
outdir?: string,
sourcemap?: string,
minify: boolean = false,
minifySyntax: boolean = false,
minifyWhitespace: boolean = false,
minifyIdentifiers: boolean = false,
splitting: boolean = false
): Promise
run(
command: string,
src: string | Directory | undefined = ".",
bunVersion: string = "latest"
): Promise
test(
src: string | Directory | undefined = ".",
bunVersion: string = "latest"
): Promise
```
## 👨💻 Programmatic usage
You can also use this pipeline programmatically:
```ts
import { test } from "jsr:@fluentci/bun";
await test();
```