2025-09-05 01:21:47 +08:00
|
|
|
name: 'Buster Deploy'
|
|
|
|
description: 'Deploy semantic models to Buster using the CLI'
|
|
|
|
author: 'Buster'
|
|
|
|
branding:
|
|
|
|
icon: 'upload-cloud'
|
|
|
|
color: 'green'
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
directory:
|
|
|
|
description: 'Directory containing buster.yml and models to deploy'
|
|
|
|
required: false
|
|
|
|
default: '.'
|
|
|
|
environment:
|
2025-09-27 02:33:23 +08:00
|
|
|
description: 'Target environment for deployment (e.g., production, staging)'
|
2025-09-05 01:21:47 +08:00
|
|
|
required: false
|
|
|
|
default: ''
|
|
|
|
verbose:
|
2025-09-27 02:33:23 +08:00
|
|
|
description: 'Enable verbose output'
|
2025-09-05 01:21:47 +08:00
|
|
|
required: false
|
|
|
|
default: 'false'
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: 'composite'
|
|
|
|
steps:
|
2025-09-27 02:31:02 +08:00
|
|
|
- name: Require Buster CLI
|
2025-09-05 01:21:47 +08:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2025-09-27 02:31:02 +08:00
|
|
|
if ! command -v buster &>/dev/null && ! command -v buster.exe &>/dev/null; then
|
2025-09-27 02:33:23 +08:00
|
|
|
echo "❌ Buster CLI not found. Please install with buster-so/buster-actions/install first."
|
2025-09-05 01:21:47 +08:00
|
|
|
exit 1
|
|
|
|
fi
|
2025-09-27 02:31:02 +08:00
|
|
|
|
2025-09-27 02:33:23 +08:00
|
|
|
- name: Deploy to Buster
|
2025-09-27 02:31:02 +08:00
|
|
|
shell: bash
|
2025-09-27 02:33:23 +08:00
|
|
|
working-directory: ${{ inputs.directory }}
|
2025-09-27 02:31:02 +08:00
|
|
|
run: |
|
|
|
|
set -e
|
2025-09-27 02:33:23 +08:00
|
|
|
if [[ -z "$BUSTER_API_KEY" ]]; then
|
|
|
|
echo "❌ Missing BUSTER_API_KEY env var"
|
2025-09-05 01:21:47 +08:00
|
|
|
exit 1
|
|
|
|
fi
|
2025-09-27 02:31:02 +08:00
|
|
|
|
|
|
|
CMD="buster deploy"
|
|
|
|
[[ -n "${{ inputs.environment }}" ]] && CMD="$CMD --environment ${{ inputs.environment }}"
|
|
|
|
[[ "${{ inputs.verbose }}" == "true" ]] && CMD="$CMD --verbose"
|
2025-09-27 02:33:23 +08:00
|
|
|
|
2025-09-27 02:31:02 +08:00
|
|
|
echo "Running: $CMD"
|
|
|
|
$CMD
|