Kizuna Actions is a CI/CD system that's syntax-compatible with GitHub Actions. Use familiar YAML syntax to automate builds, tests, and deployments.
Workflow Files
Create workflow files in .kizuna/workflows/:
repo/
├── .kizuna/
│ └── workflows/
│ ├── ci.yml
│ └── deploy.yml
└── src/Basic Workflow
yaml
# .kizuna/workflows/ci.yml
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm testTriggers
Push Events
yaml
on:
push:
branches: [main, develop]
paths:
- 'src/**'
- 'tests/**'Pull Request Events
yaml
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [main]Scheduled Events
yaml
on:
schedule:
- cron: '0 2 * * *' # Daily at 2 AMManual Trigger
yaml
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to deploy'
required: true
default: 'staging'Jobs
Single Job
yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run buildMultiple Jobs
yaml
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm run lintJob Dependencies
yaml
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm test
deploy:
needs: test # Waits for test job
runs-on: ubuntu-latest
steps:
- run: echo "Deploying..."Runners
Available Runners
| Runner | Label |
|---|---|
| Ubuntu Latest | ubuntu-latest |
| Ubuntu 22.04 | ubuntu-22.04 |
| Ubuntu 20.04 | ubuntu-20.04 |
| Self-hosted | self-hosted |
Self-Hosted Runners
yaml
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- run: make buildSteps
Basic Step
yaml
steps:
- name: Build
run: npm run buildMultiple Commands
yaml
steps:
- name: Setup
run: |
npm ci
npm run migrate
npm run seedConditional Steps
yaml
steps:
- name: Deploy Production
if: github.ref == 'refs/heads/main'
run: npm run deploy:prodEnvironment Variables
yaml
steps:
- name: Test
env:
NODE_ENV: test
API_KEY: ${{ secrets.API_KEY }}
run: npm testSecrets
Using Secrets
yaml
steps:
- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync ./dist s3://my-bucketSetting Secrets
- Go to Settings → CI/CD → Secrets
- Click New Secret
- Enter name and value
- Save
Caching
Cache Dependencies
yaml
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ciArtifacts
Upload Artifacts
yaml
steps:
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: build-files
path: dist/Download Artifacts
yaml
jobs:
deploy:
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: build-files
path: dist/Services
Using Services
yaml
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- run: npm testMatrix Builds
Test Multiple Versions
yaml
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm testContainer Jobs
Run in Container
yaml
jobs:
build:
runs-on: ubuntu-latest
container:
image: node:20-alpine
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run buildWorkflow Commands
Set Output
yaml
steps:
- id: vars
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- run: echo "SHA is ${{ steps.vars.outputs.sha }}"Set Environment Variable
yaml
steps:
- run: echo "MY_VAR=value" >> $GITHUB_ENV
- run: echo $MY_VARAdd to PATH
yaml
steps:
- run: echo "$HOME/.local/bin" >> $GITHUB_PATHMask Values
yaml
steps:
- run: echo "::add-mask::$SECRET_VALUE"Contexts
Available Contexts
| Context | Description |
|---|---|
github | Workflow run information |
env | Environment variables |
job | Current job information |
steps | Step outputs |
runner | Runner information |
secrets | Secret values |
vars | Configuration variables |
Using Contexts
yaml
steps:
- run: echo "Repository ${{ github.repository }}"
- run: echo "Ref ${{ github.ref }}"
- run: echo "Actor ${{ github.actor }}"Debugging
Enable Debug Logging
Set secret ACTIONS_STEP_DEBUG to true.
View Logs
- Go to Pipelines in repository
- Click workflow run
- Expand job and steps
Migration from GitHub Actions
Most workflows work unchanged. Differences:
| GitHub | Kizuna |
|---|---|
GITHUB_TOKEN | KIZUNA_TOKEN |
github.event | kizuna.event |
actions/github-script | kizuna/script |
Summary
Kizuna Actions provides:
- Familiar syntax — GitHub Actions compatible
- Flexible triggers — Push, PR, schedule, manual
- Job orchestration — Dependencies, matrices
- Secret management — Secure variable storage
- Artifact handling — Pass files between jobs
It's the automation engine for your CI/CD pipelines.