Trigger and run Buddy CI/CD pipelines from GitHub Actions workflows.
- Run Buddy pipelines directly from GitHub Actions
- Wait for pipeline completion by default, or fire-and-forget with
no-wait - Support for all pipeline parameters (branch, tag, revision, pull request)
- Pass variables and masked variables to pipeline executions
- Upload a file or directory from the runner as the run payload
- Configure pipeline run options (priority, refresh, cache)
- Schedule pipeline runs for later execution
- Select specific actions within a pipeline to run
name: Deploy
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Buddy
uses: buddy/login@v1
with:
token: ${{ secrets.BUDDY_TOKEN }}
region: 'US'
- name: Run pipeline
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: deploy-prodBy default, the action waits for the pipeline run to finish. Set no-wait: true to return as soon as the run is queued - the execution URL is still captured in BUDDY_RUN_URL.
- name: Trigger pipeline without waiting
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: deploy-prod
no-wait: true- name: Run pipeline on specific branch
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: build
branch: develop
comment: ${{ github.sha }}
- name: Run pipeline on tag
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: release
tag: v1.0.0
- name: Run pipeline on pull request
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: test
pull-request: ${{ github.event.pull_request.number }}- name: Run with advanced options
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: deploy
priority: HIGH # LOW, NORMAL, or HIGH
refresh: true # Deploy from scratch
clear-cache: true # Clear cache before runningenvironment is the identifier of the environment in which the pipeline execution runs. artifact selects an artifact version to run, in artifact_name:version format.
- name: Run pipeline in an environment with a specific artifact
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: deploy
environment: staging
artifact: my_app:1.2.3 # artifact_name:version- name: Run pipeline with variables
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: deploy
variable: |
ENV:production
VERSION:${{ github.ref_name }}
BUILD_NUMBER:${{ github.run_number }}
variable-masked: |
API_KEY:${{ secrets.API_KEY }}
DB_PASSWORD:${{ secrets.DB_PASSWORD }}payload uploads a file or directory from the runner to the execution, and Buddy unpacks it next to the repository checkout.
- name: Run pipeline with payload
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: deploy
payload: distPaths are relative to the repository root, and what the execution sees depends on whether the path is a directory or a file:
payload |
Files in the execution |
|---|---|
dist |
app.js, assets/app.css - contents of the directory, subdirectories kept |
build/reports/summary.json |
summary.json - a file arrives under its own name |
Notes:
- Buddy accepts at most 50 files per run (counted across all subdirectories) and 100 MB per file.
- An empty directory, or one holding nothing but subdirectories, fails the step. The payload is uploaded before the run is created, so a rejected payload means no execution was started.
- name: Schedule pipeline run
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: maintenance
schedule: 30m # Run in 30 minutes (supports: 30s, 10m, 3h10m30s, or ISO 8601)
- name: Run specific actions only
uses: buddy/run-pipeline@v1
with:
workspace: my-workspace
project: my-project
identifier: test-suite
action: |
1717106
1717107| Input | Required | Description |
|---|---|---|
workspace |
Yes | Buddy workspace domain |
project |
Yes | Buddy project name (URL handle) |
identifier |
Yes | Pipeline identifier (human-readable ID) |
comment |
No | Run comment (e.g., commit hash, build info) |
no-wait |
No | Do not wait for the run to finish; return immediately. Default: false (waits for completion) |
branch |
No | Repository branch name |
tag |
No | Repository tag name |
revision |
No | Repository revision (commit SHA) |
pull-request |
No | Repository pull request ID |
refresh |
No | Deploy from scratch (true/false) |
clear-cache |
No | Clear cache before running the pipeline (true/false) |
priority |
No | Run priority: LOW, NORMAL, or HIGH (default: NORMAL) |
environment |
No | Environment in which the pipeline execution runs |
artifact |
No | Artifact version to run, in format artifact_name:version |
variable |
No | Variables in key:value format (one per line) |
variable-masked |
No | Masked variables in key:value format (one per line) |
payload |
No | Path to a file or directory uploaded as the run payload (max 50 files, 100 MB each) |
schedule |
No | Schedule execution time (e.g., 2016-11-18T12:38:16.000Z or 30s, 10m, 3h10m30s) |
action |
No | Action ID(s) to run (one per line or comma-separated). If not provided, runs all pipeline actions |
debug |
No | Run the BDY CLI in DEBUG mode and dump ~/.bdy/cli.log on failure |
| Output | Description |
|---|---|
run_url |
The URL of the pipeline execution |
The action exports the following environment variables for use in subsequent steps:
| Variable | Description |
|---|---|
BUDDY_RUN_URL |
The URL of the pipeline execution |
This action requires authentication with Buddy. Use the buddy/login action before running pipelines:
- name: Login to Buddy
uses: buddy/login@v1
with:
token: ${{ secrets.BUDDY_TOKEN }}
region: 'US'The login action sets the following environment variables that are used by this action:
BUDDY_TOKEN- Authentication tokenBUDDY_API_ENDPOINT- API endpoint URL
By default, this action automatically installs the latest BDY CLI from the production channel. If you need a specific version or channel, use the buddy/setup action first:
# Install specific version
- name: Setup BDY CLI
uses: buddy/setup@v1
with:
version: '1.12.8'
# OR
# Install from different channel
- name: Setup BDY CLI (dev channel)
uses: buddy/setup@v1
with:
env: 'dev'
# OR
# Use different installation method (download, apt, npm)
- name: Setup BDY CLI (via NPM)
uses: buddy/setup@v1
with:
installation_method: 'npm'See the buddy/setup action for more options.
If a BDY CLI command fails, the action throws an error that includes the exit code, the command that was run, and its captured output.
Enabling debug runs the BDY CLI in DEBUG mode, so it writes verbose logs to ~/.bdy/cli.log, and on failure dumps that log (plus a stack trace) into the workflow output. Enable it in either of these ways:
-
Per step — set the
debuginput on this action:- uses: buddy/run-pipeline@v1 with: # ... debug: true
-
Whole run — enable GitHub step debug logging, either by ticking Enable debug logging in the "Re-run jobs" dialog or by setting the
ACTIONS_STEP_DEBUGrepository secret/variable totrue.
MIT - See LICENSE.md for details.