mirror of
https://github.com/apache/superset.git
synced 2026-07-12 01:35:36 +00:00
44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
name: 'Setup supersetbot'
|
|
description: 'Sets up supersetbot npm lib from the repo or npm'
|
|
inputs:
|
|
from-npm:
|
|
description: 'Install from npm instead of local setup'
|
|
required: false
|
|
default: 'true' # Defaults to using the local setup
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
|
|
- name: Setup Node Env
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install supersetbot from npm
|
|
if: ${{ inputs.from-npm == 'true' }}
|
|
shell: bash
|
|
# zizmor: ignore[adhoc-packages] - supersetbot is a first-party Apache CLI (apache-superset/supersetbot) installed globally as a tool; a global CLI install has no application manifest/lockfile context
|
|
run: npm install -g supersetbot
|
|
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
|
if: ${{ inputs.from-npm == 'false' }}
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
repository: apache-superset/supersetbot
|
|
path: supersetbot
|
|
|
|
- name: Setup supersetbot from repo
|
|
if: ${{ inputs.from-npm == 'false' }}
|
|
shell: bash
|
|
working-directory: supersetbot
|
|
# zizmor: ignore[adhoc-packages] - installs the locally packed supersetbot tarball built from the trusted apache-superset/supersetbot checkout; no lockfile applies to a global CLI install
|
|
run: |
|
|
# simple trick to install globally with dependencies
|
|
npm pack
|
|
npm install -g ./supersetbot*.tgz
|
|
|
|
- name: echo supersetbot version
|
|
shell: bash
|
|
run: supersetbot version
|