2026-04-16 20:14:09 -05:00
2026-04-16 20:03:28 -05:00
2026-04-16 20:03:28 -05:00
2026-04-16 20:03:28 -05:00
2026-04-16 20:03:28 -05:00
2026-04-16 20:03:28 -05:00
2026-04-16 20:03:28 -05:00
2026-03-26 14:55:12 -05:00
2026-03-26 14:55:12 -05:00

CI/CD Email Templates

TSX-based email templates for CI/CD pipeline success and failure notifications. The package renders Prettier-formatted HTML for both templates, writes it to disk, and emits readable HTML blocks on stdout for pipeline automation.

Placeholder

The application name placeholder is always {{APP_NAME}}.

Pipeline logic can either:

  • replace {{APP_NAME}} in the uploaded HTML before sending, or
  • set APP_NAME when running the renderer to emit app-specific HTML directly.

Local usage

Build the package:

pnpm install --frozen-lockfile
pnpm run build

Render the templates:

pnpm start

By default this writes:

  • build/html/pipeline-success.html
  • build/html/pipeline-failure.html

Override the application name or output directory with environment variables:

APP_NAME=my-service OUTPUT_DIR=./out pnpm start

Podman lifecycle

Build and run through podman-compose:

podman-compose up --build

The rendered HTML files are written to ./build/html on the host.

Override the rendered app name during compose runs:

APP_NAME=my-service podman-compose up --build

If APP_NAME is not set, the renderer falls back to {{APP_NAME}}.

GitHub Actions release

The workflow at .github/workflows/release.yml:

  1. builds the production container image with Podman
  2. runs the renderer to produce HTML files
  3. uploads the generated templates to a Cloudflare R2 bucket

The release job targets the Production GitHub Actions environment.

Required Production environment secrets:

  • CF_R2_ACCESS_KEY_ID
  • CF_R2_SECRET_ACCESS_KEY
  • CF_R2_ACCOUNT_ID
  • CF_R2_BUCKET

Optional Production environment variable:

  • CF_R2_PREFIX
S
Description
No description provided
Readme
49 KiB
Languages
TypeScript 86.6%
JavaScript 8.5%
Dockerfile 4.9%