-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
63 lines (59 loc) · 1.69 KB
/
action.yaml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Install
author: liblaf
description: The action allows you to install software packages using various package managers (APT, Homebrew, Chocolatey, eget, Linuxbrew, NPM, and pipx) based on the operating system and inputs provided.
inputs:
apt:
description: APT
required: false
brew:
description: Homebrew
required: false
choco:
description: Chocolatey
required: false
eget:
description: Eget
required: false
linuxbrew:
description: Linuxbrew
required: false
npm:
description: NPM
required: false
pipx:
description: pipx
required: false
token:
description: GitHub token
required: false
default: ${{ github.token }}
runs:
using: composite
steps:
- run: python "${{ github.action_path }}/scripts/env.py"
shell: bash
- run: |-
sudo apt-get update
sudo apt-get install ${{ inputs.apt }}
shell: bash
if: runner.os == 'Linux' && inputs.apt
- run: bash "${{ github.action_path }}/scripts/brew.sh" ${{ inputs.brew }}
shell: bash
if: runner.os == 'macOS' && inputs.brew
- run: choco install ${{ inputs.choco }}
shell: bash
if: runner.os == 'Windows' && inputs.choco
- run: bash "${{ github.action_path }}/scripts/eget.sh" ${{ inputs.eget }}
shell: bash
if: inputs.eget
env:
GITHUB_TOKEN: ${{ inputs.token }}
- run: bash "${{ github.action_path }}/scripts/linuxbrew.sh" ${{ inputs.linuxbrew }}
shell: bash
if: runner.os == 'Linux' && inputs.linuxbrew
- run: npm install --global ${{ inputs.npm }}
shell: bash
if: inputs.npm
- run: pipx install ${{ inputs.pipx }}
shell: bash
if: inputs.pipx