-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
37 lines (35 loc) · 1.3 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: 'fish-shop/install-plugin'
description: 'A GitHub action for installing fish shell plugins'
branding:
icon: 'arrow-down'
color: 'green'
inputs:
plugin-manager:
description: 'The name of the fish shell plugin manager to use'
required: true
plugins:
description: 'The plugin(s) to install; this value is passed verbatim as an argument to the install command of the chosen plugin manager and the values supported may differ between tools'
required: true
runs:
using: 'composite'
steps:
- uses: fish-shop/install-plugin-manager@a75032b3f72c7367e2dfc37046f950c23f9eaddf # v2.3.25
with:
plugin-manager: ${{ inputs.plugin-manager }}
- name: Install plugins
env:
PLUGIN_MANAGER: ${{ inputs.plugin-manager }}
PLUGINS: ${{ inputs.plugins }}
run: |
set -gx TERM xterm-256color
set plugin_manager (string escape --no-quoted -- $PLUGIN_MANAGER)
set plugins (string split --no-empty ' ' -- $PLUGINS | string escape --no-quoted)
switch $plugin_manager
case 'fisher'
fisher install $plugins
case 'oh-my-fish'
omf install $plugins
case '*'
echo "Unrecognised plugin manager: '$plugin_manager'" >&2; and exit 1
end
shell: fish {0}