-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathaction.yml
55 lines (51 loc) · 1.43 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: 'Install Package'
description: 'Install system packages from brew, brew cask, apt and choco.'
branding:
icon: package
color: blue
inputs:
brew:
description: Packages to install with brew on macOS
required: false
default: ''
brew-cask:
description: Packages to install with brew cask on macOS
required: false
default: ''
apt:
description: Packages to install with apt on Linux
required: false
default: ''
# yum:
# description: Packages to install with yum inside Docker on Linux
# required: false
# default: ''
choco:
description: Packages to install with choco on Windows
required: false
default: ''
runs:
using: "composite"
steps:
- name: Install brew packages
if: runner.os == 'macOS' && inputs.brew != ''
run: |
brew update
echo "${{ inputs.brew }}" | xargs -n 1 brew install
shell: sh
- name: Install brew cask packages
if: runner.os == 'macOS' && inputs.brew-cask != ''
run: |
brew update
echo "${{ inputs.brew-cask }}" | xargs -n 1 brew install --cask
shell: sh
- name: Install apt packages
if: runner.os == 'Linux' && inputs.apt != ''
run: |
sudo apt update
sudo apt install -y ${{ inputs.apt }}
shell: sh
- name: Install choco packages
if: runner.os == 'Windows' && inputs.choco != ''
run: choco install -y ${{ inputs.choco }}
shell: sh