-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
45 lines (33 loc) · 887 Bytes
/
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
name: 'install_apt_packages'
description: 'Install apt packages'
inputs:
packages:
description: 'Custom packages to install using apt'
required: true
update:
description: 'Update apt'
required: false
default: true
upgrade:
description: 'Upgrade already installed apt packages'
required: false
default: false
runs:
using: composite
steps:
- name: install_apt_packages
run: |
echo "::group::Install apt packages ${{ inputs.packages }}"
# Update apt repos
if [ "${{ inputs.update }}" = "true" ]; then
sudo apt update
fi
# Install custom packages
sudo apt -y install \
${{ inputs.packages }}
# Upgrade apt repos
if [ "${{ inputs.upgrade }}" = "true" ] ; then
sudo apt upgrade
fi
echo "::endgroup::"
shell: bash