buster/actions/deploy/action.yml

49 lines
1.3 KiB
YAML
Raw Permalink Normal View History

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)'
required: false
default: ''
verbose:
2025-09-27 02:33:23 +08:00
description: 'Enable verbose output'
required: false
default: 'false'
runs:
using: 'composite'
steps:
2025-09-27 02:31:02 +08:00
- name: Require Buster CLI
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."
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"
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